Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Q13.

i. To display the name of all games with their gcodes.


ii. To display details of those games which are having prize money more than 7000.
iii. To display the content of games table in ascending order of schedule date.
iv. To display sum of prize money for each of the number of participation.
v. Select count(distinct number) from games;
vi. Select max(scheduledate),min(scheduledate)from games;
vii. Select sum(pricemoney) from games;
viii. Select distinct gcode from player;
1. OUR OWN HIGH SCHOOL, AL WARQA’A
2. Computer Science Workshop : Grade 12
3. 3 Jatin 101
4. 4 Nazneen 103
5. (i) To display the name of all Games with their Gcodes.
6. SELECT GameName, Gcode FROM games;
7. (ii) To display details of those games which are having prizemoney more than 7000.
8. SELECT * FROM games WHERE PrizeMoney>7000;
9. (iii) To display the contents of the GAMES table in ascending order of ScheduleDate
10. SELECT * FROM games ORDER BY ScheduleDate;
11. (iv) To display sum of PrizeMoney for each of the number of participation.
12. SELECT SUM(PrizeMoney), Number FROM games GROUP BY number;
13. (v) SELECT COUNT(DISTINCT number) FROM games;
14. COUNT(DISTCINT)
15. --------------------------
16. 2
17. (vi) SELECT MAX(SheduleDate), MIN(ScheduleDate) FROM games;
18. MAX(SHEDULEDATE) MIN(SCHEDULEDATE)
19. ------------------------------- ---------------------------------
20. 19-Mar-2004 12-Dec-2003
21. (vii) SELECT SUM(PrizeMoney) FROM games;
22. SUM(PRIZEMONEY)
23. -----------------------------
24. 59000
25. (viii) SELECT DISTICNT gcode FROM player;
26. DISTICNT GOCDE
27. -------------------------

You might also like