SQL select
Budget: $10 – $30 USD
3 separate sql statements Group by
1 - Group by day
2 - Group by week (a week is Monday thry Sunday)
3 - Group by Month
Table structure is
ges_id bigint (20) NOT NULL auto_increment,
user_id int(11) NOT NULL default '0',
word varchar(50) NOT NULL,
guessday date,
guessday_datetime datetime,
winner tinyint(4) NOT NULL default '0',
match_exact tinyint(4) NOT NULL default '0',
ct_letters tinyint(4) NOT NULL default '0',
PRIMARY KEY (ges_id)
*******************************************************************************
DATA Information
g.winner 1 = winner 0 = Not winner
g.match_exact This is how many they matched
g.ct_letters This is how many letters are in word they guessed
words can be a different length each day
*********************************************************************************
SAMPLE Basic sql:
SELECT g.ges_id, u.username, g.user_id, g.word, g.guessday, g.guessday_datetime, g.winner, g.match_exact, g.ct_letters, DATE_FORMAT(guessday_datetime,'%a, %b %e, %Y - %l:%i%p ET') AS longdate
FROM nuke_wordguess_guess g
LEFT JOIN nuke_users u ON (u.user_id = g.user_id)
WHERE g.winner=1 GROUP BY g.guessday ORDER BY g.guessday_datetime ASC LIMIT 0, 100
**************************************************************************************************
1st Place winners are marked by 1 in winner column and have g.match_exact same value as g.ct_letters
2nd place MUST have g.match_exact count 1 less than g.ct_letters
3rd place MUST have g.match_exact count 2 less than g.ct_letters
**************************************************************************************************
1 - Group by day
2 - Group by week (a week is Monday thry Sunday)
3 - Group by Month
Table structure is
ges_id bigint (20) NOT NULL auto_increment,
user_id int(11) NOT NULL default '0',
word varchar(50) NOT NULL,
guessday date,
guessday_datetime datetime,
winner tinyint(4) NOT NULL default '0',
match_exact tinyint(4) NOT NULL default '0',
ct_letters tinyint(4) NOT NULL default '0',
PRIMARY KEY (ges_id)
*******************************************************************************
DATA Information
g.winner 1 = winner 0 = Not winner
g.match_exact This is how many they matched
g.ct_letters This is how many letters are in word they guessed
words can be a different length each day
*********************************************************************************
SAMPLE Basic sql:
SELECT g.ges_id, u.username, g.user_id, g.word, g.guessday, g.guessday_datetime, g.winner, g.match_exact, g.ct_letters, DATE_FORMAT(guessday_datetime,'%a, %b %e, %Y - %l:%i%p ET') AS longdate
FROM nuke_wordguess_guess g
LEFT JOIN nuke_users u ON (u.user_id = g.user_id)
WHERE g.winner=1 GROUP BY g.guessday ORDER BY g.guessday_datetime ASC LIMIT 0, 100
**************************************************************************************************
1st Place winners are marked by 1 in winner column and have g.match_exact same value as g.ct_letters
2nd place MUST have g.match_exact count 1 less than g.ct_letters
3rd place MUST have g.match_exact count 2 less than g.ct_letters
**************************************************************************************************