Dont want to keep writing these mySQL Queries over and over so park here:
SELECT FLOOR(MAX('item')), FLOOR(MAX(item1)), FLOOR(MAX(item2)), FLOOR(MAX(item3)), FLOOR(MAX(item4)) ,FLOOR(MAX(item5)),FLOOR(MAX(item6)),FLOOR(MAX(item7)),FLOOR(MAX(item8)), FLOOR(MAX(item9)), FLOOR(MAX(item10)),FLOOR(MAX(item11)),FLOOR(MAX(item12)),FLOOR(MAX(item13)), FLOOR(MAX(item14)), FLOOR(MAX(item15)), FLOOR(MAX(item16)), FLOOR(MAX(item17)), FLOOR(MAX(item18)) ,FLOOR(MAX(item19)),FLOOR(MAX(item20)),FLOOR(MAX(item20)),FLOOR(MAX(item21)), FLOOR(MAX(item22)), FLOOR(MAX(item23)),FLOOR(MAX(item24)) FROM Vains_test1 WHERE mood = 'happy' AND gender = 'female' AND age = '16' AND country = 'Israel' AND weather = 'sunny' AND artEd = 'yes'
with an alias:
SELECT FLOOR(AVG('item')), FLOOR(AVG(item1)), FLOOR(AVG(item2)), FLOOR(AVG(item3)), FLOOR(AVG(item4)) ,FLOOR(AVG(item5)),FLOOR(AVG(item6)),FLOOR(AVG(item7)),FLOOR(AVG(item8)), FLOOR(AVG(item9)), FLOOR(AVG(item10)),FLOOR(AVG(item11)),FLOOR(AVG(item12)),FLOOR(AVG(item13)), FLOOR(AVG(item14)), FLOOR(AVG(item15)), FLOOR(AVG(item16)), FLOOR(AVG(item17)), FLOOR(AVG(item18)) ,FLOOR(AVG(item19)),FLOOR(AVG(item20)),FLOOR(AVG(item20)),FLOOR(AVG(item21)), FLOOR(AVG(item22)), FLOOR(AVG(item23)),FLOOR(AVG(item24))as r FROM Vains_test1 WHERE mood = 'happy' AND gender = 'female' ORDER BY r ASC
SELECT FLOOR(AVG('item')), FLOOR(AVG(item1)), FLOOR(AVG(item2)), FLOOR(AVG(item3)), FLOOR(AVG(item4)) ,FLOOR(AVG(item5)),FLOOR(AVG(item6)),FLOOR(AVG(item7)),FLOOR(AVG(item8)), FLOOR(AVG(item9)), FLOOR(AVG(item10)),FLOOR(AVG(item11)),FLOOR(AVG(item12)),FLOOR(AVG(item13)), FLOOR(AVG(item14)), FLOOR(AVG(item15)), FLOOR(AVG(item16)), FLOOR(AVG(item17)), FLOOR(AVG(item18)) ,FLOOR(AVG(item19)),FLOOR(AVG(item20)),FLOOR(AVG(item20)),FLOOR(AVG(item21)), FLOOR(AVG(item22)), FLOOR(AVG(item23)),FLOOR(AVG(item24)) FROM Vains_test1 WHERE mood = 'happy' AND gender = 'female' AND age = '16' AND country = 'Israel' AND weather = 'sunny'
AND artEd = 'yes'
Thursday, 10 June 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment