Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
19 views

Lab Programs 2023-24 SQL

This document contains SQL queries and their outputs: i. Queries to display game names and codes, details of games with prize money over 7000, and games table ordered by schedule date. ii. A query to display the sum of prize money grouped by number of participations. iii. Queries to count distinct numbers in games table, find max and min schedule dates, sum prize money, and select distinct codes from player table.

Uploaded by

Computer Project
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Lab Programs 2023-24 SQL

This document contains SQL queries and their outputs: i. Queries to display game names and codes, details of games with prize money over 7000, and games table ordered by schedule date. ii. A query to display the sum of prize money grouped by number of participations. iii. Queries to count distinct numbers in games table, find max and min schedule dates, sum prize money, and select distinct codes from player table.

Uploaded by

Computer Project
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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