Computer Science, asked by nancynain16, 2 days ago

D. Consider the given table and write the SQL queries for the following statements:
Please answer​

Attachments:

Answers

Answered by krithika117
39

Answer:

1. SELECT NAME, COMMISSION FROM SALESMAN;

2. SELECT NAME FROM SALESMAN WHERE CITY = "Mumbai";

3. SELECT NAME FROM SALESMAN WHERE COMMISSION < 14;

4. SELECT COUNT(S_ID), CITY FROM SALESMAN GROUP BY CITY;

Explanation:

- SELECT statement is used to display tabular data.

- WHERE is used for mentioning a particular condition.

- COUNT is used for counting the total of a particular columnar attribute.

- GROUP BY is used for grouping data with respect to a particular attribute.

Hope this helped :)

Answered by khurramdocmail
10

Answer:

1:

SELECT name, city FROM SALESMAN;

2:

SELECT name FROM SALESMAN WHERE city = "Mumbai";

3:

SELECT name FROM SALESMAN WHERE commission<14;

4:

SELECT city, COUNT (DISTINCT s_id) as count FROM salesman GROUP BY city;

Explanation:

Similar questions