You are on page 1of 4

DATABASE AND SQL QUERIES:

In this report, we will create a database and execute SQL queries to retrieve specific
information about customers and salesperson from the provided tables.

TABLE CREATION AND DATA ISERTION:


We start creating the necessary table and inserting data into them.
1. Table creation:

1. Data insertion:
SQL QUERIES AND RESULT:

Q1). From the following tables write a SQL query to display the customer
name, customer city, grade, salesman, salesman city. The results should be
sorted by ascending customer_id. 

Q2). From the following tables write a SQL query to find those customers with a grade
less than 300. Return cust_name, customer city, grade, Salesman, salesmancity. The result
should be ordered by ascending customer_id. 
Q3). Write a SQL statement to generate a list in ascending order of
salespersons who work either for one or more customers or have not
yet joined any of the customers.
Q4). Write a SQL query to combine each row of the salesman table
with each row of the customer table. 

CONCLUSION: In this report, we created a database with tables for salesman and customer.
We inserted data into these tables and executed SQL queries to retrieve specific information about

Customer, salesman, and their grades. The SQL queries provided relevant results as requested and

Demonstrated the capabilities of the database management system in handling data retrieval

operations. The provided data and queries were used for demonstration purpose only, and in a real-

World scenario, the actual database and tables may vary.

You might also like