Skip to content

Instantly share code, notes, and snippets.

@rissajeanne
Created November 18, 2011 20:49
Show Gist options
  • Save rissajeanne/1377709 to your computer and use it in GitHub Desktop.
Save rissajeanne/1377709 to your computer and use it in GitHub Desktop.
CREATE TABLE IF NOT EXISTS `exp_rating_stats` (
`stat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`entry_id` int(10) unsigned NOT NULL DEFAULT '0',
`channel_id` int(4) unsigned NOT NULL DEFAULT '0',
`member_id` INT UNSIGNED NOT NULL DEFAULT 0,
`collection` varchar(50) NOT NULL,
`last_rating_date` int(10) unsigned NOT NULL DEFAULT '0',
`count` int(10) unsigned NOT NULL DEFAULT '0',
`sum` int(10) unsigned NOT NULL DEFAULT '0',
`avg` float unsigned NOT NULL DEFAULT '0',
`count_1` int(10) unsigned NOT NULL DEFAULT '0',
`sum_1` int(10) unsigned NOT NULL DEFAULT '0',
`avg_1` float unsigned NOT NULL DEFAULT '0',
`count_2` int(10) unsigned NOT NULL DEFAULT '0',
`sum_2` int(10) unsigned NOT NULL DEFAULT '0',
`avg_2` float unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`stat_id`),
KEY `entry_id` (`entry_id`),
KEY `channel_id` (`channel_id`),
KEY `member_id` (`member_id`),
KEY `count` (`count`),
KEY `sum` (`sum`),
KEY `avg` (`avg`)
) ;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment