0% found this document useful (0 votes)
8 views3 pages

SQL Practice Questions

The document contains a list of SQL practice questions based on LIS, FLIS, and University databases. It includes various queries related to authors, books, students, instructors, teams, and courses, with specific conditions and requirements for each question. Solutions to these questions will be released on the portal on February 18, 2022.

Uploaded by

xnoscope1x
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

SQL Practice Questions

The document contains a list of SQL practice questions based on LIS, FLIS, and University databases. It includes various queries related to authors, books, students, instructors, teams, and courses, with specific conditions and requirements for each question. Solutions to these questions will be released on the portal on February 18, 2022.

Uploaded by

xnoscope1x
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

BSCCS2001: SQL Practice Questions

Instructions:

• The questions are based on LIS, FLIS, and University database.

• If you have any doubt in any questions or want to discuss the solutions on discourse,
please post it under “SQL Practice Questions” tag.

• The solution of these questions will be release on the portal on 18-Feb-2022


1. Find the first names and last names of authors, having the author’s first name as a single
Character. (Database: LIS)

2. Find the titles and publishers of all books, except the ones published in year ‘2015’ or
‘2017’. (Database: LIS)

3. Find the first names and last names of the students whose birthday is in May 2002 or
in May 2003. (Database: LIS)

4. Find out the total number of members in the UG with alias name or column header as
‘total member’. (Database: LIS)

5. Find out the number of female students in each department. (Database: LIS)

6. Find the names and date-of-births of those managers who have joined in years 2019 and
2020. (Database: FLIS)

7. Find the names of all those teams where the last name of the team starts with the letter
S. Use the name attribute of the teams table to answer this question. (Database: FLIS)

8. Print the name, dept name, salary of instructors department wise, where the department
name should be sorted in descending order and within each department, the instructor
names should be sorted in ascending order of salary within that department. (Database:
University)

9. Write a SQL statement to find the names of players that start with ‘S’ but does not end
with ‘n’. (Database: FLIS)

10. Find out the total number of players who are playing from the team id ‘T0001’. (Database:
FLIS)

11. Write a query to obtain the natural join between the tables, students and departments.
(Database: LIS)

12. Find details of those instructors of the Accounting department who have more salary
than at least one instructor of the Psychology department. (Database: University)

13. Write a SQL statement to find out the manager’s date of birth(dob) of the team for
which “Shlok” plays. (Database: FLIS)

14. Write a SQL statement to find out match number(match num) played in the playground
“Emirates Stadium”. (Database: FLIS)

15. Find the name, player id, date of birth and city of all players who played for team
‘Rainbow’. (Database: FLIS)

16. Find the name of the teams which belong to the same city as the team ‘Amigos’.
(Database: FLIS)

Page 2
17. Find the name of the department in which Gita Das is studying. (Database: LIS)

18. Find the roll number of all male students, having their department building in ‘Block 2’.
(Database: LIS)

19. Find the first name, last name and the roll number of students having their department
building in ‘Block 1’. (Database: LIS)

20. Find out the details of the members who have not issued any books. (Database: LIS)

21. Find out the name of courses which have been taught in both Fall semester and Spring
semester. (Database: University)

22. Write a SQL statement to find out the number of students who have studied in each
building from 2005 till 2008 (including 2005,2008). (Database: University)

23. Write a SQL statement to find out the dates when one or more copies of the book having
the title “Learning with Python” has been issued. (Database: LIS)

24. Write a SQL statement to find the name and salary of the instructor(s) having the
max salary within that department whose avg salary is more than the max salary of
Psychology dept. (Database: University)

25. Write a SQL statement to find out the number of courses which have been taught in
Fall semester but never in Spring semester. (Database: University)

26. Print name,id,num count of instructor(s) who has taught maximum number of classes on
the day ’W’. (num count is the number of the classes they took on day ’W’.) (Database:
University)

27. Find the names of the fourth referees (fourth referee) and the match number of all
matches played on “2020-05-19”. (Database: FLIS)

28. Write a SQL statement to find out the names of research scholars (RS) who have not
issued any books. (Database: LIS)

29. Write a SQL statement to find out the name of the oldest player from the team named
“All Stars”. (Database: FLIS)

30. Write an SQL statement to find the unique book titles which are issued to “PG” students
but not to “UG” students.(Database: LIS)

Page 3

You might also like