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

SQL Practice

Uploaded by

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

SQL Practice

Uploaded by

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

1.

Write a SQL statement that displays all the information about all
salespeople.

Sample table: salesman


salesman_id | name | city | commission
-------------+------------+----------+------------
5001 | James Hoog | New York | 0.15
5002 | Nail Knite | Paris | 0.13
5005 | Pit Alex | London | 0.11
5006 | Mc Lyon | Paris | 0.14
5007 | Paul Adam | Rome | 0.13
5003 | Lauson Hen | San Jose | 0.12

Solution: - SELECT * FROM salesman;

2. Write a SQL query to display three numbers in three columns.

Solution: SELECT 5, 10, 15;

3.Write a SQL statement to display specific columns such as names and


commissions for all salespeople.

Sample table: salesman


salesman_id | name | city | commission
-------------+------------+----------+------------
5001 | James Hoog | New York | 0.15
5002 | Nail Knite | Paris | 0.13
5005 | Pit Alex | London | 0.11
5006 | Mc Lyon | Paris | 0.14
5007 | Paul Adam | Rome | 0.13
5003 | Lauson Hen | San Jose | 0.12

Solution: SELECT name, commission FROM salesman;

You might also like