hi everyone !!
i have a table (take a look of atached image) and i wont to get from that table top 3 records witch have the top 3 maximal value of NumberOfTickets ...
but than i write :
SELECT top 3 NumberOfTickets
FROM GetSumOfAllTick etsForDate;
it gives me 3 first records from table ,unregarding the quantity of values in NumberOfTickets column.[IMG]C:\Documents and Settings\nat\De sktop\cinemaDB. JPG[/IMG]
what i am doing wrong?
thanks !!!!!
=============== =============== =
in case the image not loaded the GetSumOfAllTick etsForDate table has columns:
MovieName
MovieID
MovieDiscriptio n
MovieImgLocatio n
NumOfOrderedTic kets
i have a table (take a look of atached image) and i wont to get from that table top 3 records witch have the top 3 maximal value of NumberOfTickets ...
but than i write :
SELECT top 3 NumberOfTickets
FROM GetSumOfAllTick etsForDate;
it gives me 3 first records from table ,unregarding the quantity of values in NumberOfTickets column.[IMG]C:\Documents and Settings\nat\De sktop\cinemaDB. JPG[/IMG]
what i am doing wrong?
thanks !!!!!
=============== =============== =
in case the image not loaded the GetSumOfAllTick etsForDate table has columns:
MovieName
MovieID
MovieDiscriptio n
MovieImgLocatio n
NumOfOrderedTic kets
Comment