0% found this document useful (0 votes)
24 views49 pages

Vivek

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)
24 views49 pages

Vivek

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/ 49

DELHI INSTITUTE OF TECHNOLOGY

AND MANAGEMENT
MDU , ROHTAK
PRACTICAL FILE

NAME : VIVEK
COURSE /SEMESTER :
BCA III
REGISTRATION-NO :-2317521255
SUBJECT : SQL(BCA-203)
SUBMITTED TO : DR.RAMESH KUMAR
SHARMA
Query1:- Display name and
commission for all the salesmen.
OUTPUT:-

OUTPUT:-
Query2:- Retrieve salesman id
of all salesmen from orders table
without any repeats.
OUTPUT:-

OUTPUT:-
Query3:- Display names and city
of salesman, who belongs to the
city of Paris.
OUTPUT:-

OUTPUT:-
Query4:- Display all the
information for those customers
with a grade of 200.

OUTPUT:-
OUTPUT:-

Query5:- Display the order


number, order date and the
purchase amount for order(s)
which will be delivered by the
salesman with ID 5001.
OUTPUT:-
OUTPUT:-

Query 6: Show the winner of the


1971 prize for Literature.
Output:
Query 7: Show all the details of
the winners with first name louis.
Output:
Query 8: Show all the winners in
Physics for 1970 together with
the winner of economics for 1971.

Output:
Query 9: Show all the winners of
Nobel prize in the year 1970
except the subject physiology
and economics.

Output:
Query 10: Find all the details of
the Nobel winners for the subject
not started with the letter 'P' and
arranged the list as the most
recent comes first, then by name
in order.

Output:
Query 11: Find the name and
price of the cheapest item.

Output:

Query 12: Display all the


customers, who are either
belongs to the city of new York or
not had a grade above 100.

Output:
Query13:- Find those salesmen
with all information who gets the
commission within a range of
0.12 and 0.14.

Output:-
Output:-

Query14:- Find all those


customers with all information
whose names are ending with
the letter 'n'.

Output:-
Output:-
Query15:- Find those salesmen
with all information whose name
containing the 1st character is 'N'
and the 4th character is 'l' and
rests may be any character.
Output:-

Output:-
Query16:- Find that customer
with all information who does not
get any grade except
NULL.
Output:-

Output:-
Query17:- Find the total
purchase amount of all orders.

Output:-
Output:-
Query18:- Find the number of
salesman currently listing for all
of their customers.

Output:-
Output:-
Query19:- Find the highest
grade for each of the cities of the
customers.

Output:-
Output:-
Query20:- Find the highest
purchase amount ordered by the
each customer with their ID and
highest purchase amount.
Output:-
Output:-
Query21:- Find the highest
purchase amount ordered by the
each customer on a particular
date with their ID, order date and
highest purchase amount.
Output:-
Output:-
Query22:- Find the highest
purchase amount on a date
'2012-08-17' for each salesman
with their ID.
Output:-
Output:-
Query23:- Find the highest
purchase amount with their
customer ID and order date, for
only those customers who have
the highest purchase amount in a
day is more than 2000.

Output:-
Output:-
Query24:- Write a SQL
statement that counts all orders
for a date August 17th, 2012.
Output:-

Output:-

You might also like