SQL Prac - File Quess
SQL Prac - File Quess
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:
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.