SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL by John Viescas & Michael J. Hernandez
Author:John Viescas & Michael J. Hernandez
Language: eng
Format: epub
Publisher: Addison-Wesley Professional
Published: 2014-08-23T04:00:00+00:00
* * *
Note
You guessed it! This is another example where you must build the filtered INNER JOIN result set first and then OUTER JOIN that with the table from which you want “all” rows.
* * *
Recipes Database
“List ingredients not used in any recipe yet.”
Translation/Clean Up
Select ingredient name from the ingredients table left outer joined with the recipe ingredients table on ingredients.ingredient ID in the ingredients table matches = recipe_ingredients.ingredient ID in the recipe ingredients table where recipe ID is null
SQL
SELECT Ingredients.IngredientName
FROM Ingredients
LEFT OUTER JOIN Recipe_Ingredients
ON Ingredients.IngredientID =
Recipe_Ingredients.IngredientID
WHERE Recipe_Ingredients.RecipeID IS NULL
CH09_Ingredients_Not_Used (20 rows)
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8293)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6688)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6662)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6536)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6325)
Driving Data Quality with Data Contracts by Andrew Jones(6275)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6040)
Learning SQL by Alan Beaulieu(5988)
Weapons of Math Destruction by Cathy O'Neil(5778)
Big Data Analysis with Python by Ivan Marin(5338)
Data Engineering with dbt by Roberto Zagni(4339)
Solidity Programming Essentials by Ritesh Modi(3985)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3839)
Pandas Cookbook by Theodore Petrou(3549)
Blockchain Basics by Daniel Drescher(3292)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2900)
Feature Store for Machine Learning by Jayanth Kumar M J(2808)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2791)
Mastering Python for Finance by Unknown(2743)
