0% found this document useful (0 votes)
24 views

SQL Prac - File Quess

Uploaded by

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

SQL Prac - File Quess

Uploaded by

palaadi7772
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

SQL QUERIES

Q1.

a) Create the above given table with appropriate data type and constraints.
b) Count the number of patients belongs to doctor no D201.
c) Display name of patient paying highest charge.
d) Display pno, name of patient in descending order of date of admission.
e) Display the last name of patients from pname with date of admission.
f) Display the patients details with charges converted to whole number
g) Display details of the patient paying minimum charge.

Q2. Consider the following Table ‘Store’ with the records given in it. Write SQL queries for the
following:

Create above table garment


a)
Count the unique company from garment.
b)
Display maximum price of garment manufactured by raymond.
c)
Display the average price of Pant.
d)
Display the garment number, garment name and company in the descending order of their
e)
price.
f) Find the difference between maximum price and minimum price from the table.
g) Display garment in upper case letters and ‘discountedprice’ which is price minus 5 % of
price for price in between 2100 to 10000.
Q3. Consider the following Table ‘Shop’ with the records given in it. Write SQL queries for the
following:

a) Create the above given table with appropriate data type and constraints.
b) Display the details of all records in ascending order of company name.
c) Display Itemname and company in uppercase letters.
d) Display total price of the items of Stylo company
e) Display the average price of Item whose name starts with letter P.
f) Display the item name having minimum price.
g) Display the price of each item in integer.

You might also like