Roll no.
33,Name:Pranshav Jobanputra Div:D
DBMS Tutorial-1
Q-1)Write SQL statement to display all the
information of all salesman?
• Code: Select * from salesman;
Output:
Q-2)Write SQL Statement to display specific
columns like name and commission for all the
salesman?
• Code: Select name,commission from
salesman;
• Output:
Enrollement:23SDSCE01235,Subject:DBMS,academic year:2024-25
Roll no.33,Name:Pranshav Jobanputra Div:D
Q-3)Write a query to display the columns in a
specific order like order date , saleman_id ,
order number and purchase amount from all
the orders?
Select ord_date, salesman_id,
ord_no, purch_amt From orders;
Output:
Q-4)Write a query Which will retrieve the
value of salesman id of all salesman,getting
oders from the customers in orders table
without any repeats?
Select Distinct salesman_id from
orders;
Output:
Enrollement:23SDSCE01235,Subject:DBMS,academic year:2024-25
Roll no.33,Name:Pranshav Jobanputra Div:D
Q-5)Write a SQL statement to display names
and city of salesman,who belongs to the city
of paris?
Code: Select name, city from
salesman;
Output:
Q-6)Write a SQL statement to display all the
information for those customer with a grade
of 200?
Code: Select * from customer where
grade>100;
Output:
Enrollement:23SDSCE01235,Subject:DBMS,academic year:2024-25
Roll no.33,Name:Pranshav Jobanputra Div:D
Q-7)Write a SQL query to display the order
number followed by order date and the
purchase amount for each order which will
be delivered by the salesman who is holding
the id 5001?
->select ord_no,ord_date,purch_amt where
salesman_id =5001;
output:
Q-8)Write a SQL to query to display the
nobel prizes for 1970?
-> select year,subject, winner from
nobel_win where year=1970;
output:
Enrollement:23SDSCE01235,Subject:DBMS,academic year:2024-25
Roll no.33,Name:Pranshav Jobanputra Div:D
Q-9)Write a SQL query to know the winner of
the 1971 price of literature?
->select winner from nobel_win where
subject=”Literature” and year=1971;
Output:
Q-10)Write a SQL query to display the year
and subject that won 'Dennis Gabor' his
prize?
-> select subject,year from nobel_win
where winner="Dennis Gabor";
Output:
Enrollement:23SDSCE01235,Subject:DBMS,academic year:2024-25
Roll no.33,Name:Pranshav Jobanputra Div:D
Q-11)Write a SQL query to give the name of
the 'Physics' winners since the year 1950?
->select winners from nobel_win where
subject="Physics" and year=1950;
Output:
Q-12)Write a SQL query to Show all the
details of the Chemistry prize winners
between the year 1965 to 1975 inclusive?
-> select year,subject,winner,country from
nobel_win where subject=’chemistry’ and
year=1965,year=1975;
Output:
End Of Tutorial-1
Enrollement:23SDSCE01235,Subject:DBMS,academic year:2024-25