AdventureWorks Database: Return any distinct values from first query, not found on the 2nd query
SQL Query - AdventureWorks: Exercise-133 with Solution
133. From the following tables write a query in SQL to return any distinct values from first query that aren't also found on the 2nd query.
Sample table: production.Product
Sample table: production.WorkOrder
SELECT ProductID FROM Production.Product EXCEPT SELECT ProductID FROM Production.WorkOrder ;
productid| ---------+ 846| 938| 477| 394| 867| 858| 874| 424| 406| 849| 509| 929| 417| 932| ...
SQL AdventureWorks Editor:
Contribute your code and comments through Disqus.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join