Informatics Practices
Consider following tables to answer below question :
Salesman (salesman_id, name, city, commission ) and
Customer (customer_id, cust_name, city, grade, salesman_id )
Write an SQL query to display distinct salesman and their cities.
SQL Joins & Grouping
2 Likes
Answer
SELECT DISTINCT salesman_id, name, city
FROM Salesman;
Answered By
3 Likes
Related Questions
In a Database School there are two tables Member and Division as shown below.
Table : Member
EmpId Name Pay Divno 1001 Shankhya 34000 10 1003 Ridhima 32000 50 1002 Sunish 45000 20 Table : Division
Divno Divname Location 10 Media TF02 20 Dance FF02 30 Production SF01 (i) Identify the foreign key in the table Member.
(ii) What output, you will get, when an equi-join query is executed to get the NAME from Member Table and corresponding from Division table ?
Consider following tables to answer below question :
Salesman (salesman_id, name, city, commission ) and Customer (customer_id, cust_name, city, grade, salesman_id )Write an SQL query to display all salesmen and customer located in Chennai.
Consider following tables to answer below question :
Salesman (salesman_id, name, city, commission ) and Customer (customer_id, cust_name, city, grade, salesman_id )Write an SQL query to list all the salesmen who do not have customers in 'DELHI' and 'JAMMU'.
Consider following tables to answer below question :
Salesman (salesman_id, name, city, commission ) and Customer (customer_id, cust_name, city, grade, salesman_id )Write an SQL query to list all the salesmen who have customers with grade 200 or higher.