This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- I had an existing products table, and needed to denormalize two fields for faster sorting. | |
-- The number of rates and total rating is currently in a ratings table, and needs to be copied to products | |
create table products ( | |
id integer, | |
name varchar(16), | |
ratings_count integer, | |
total_rating integer | |
); | |
NewerOlder