
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
This is for SQL. Show a union that uses more than two select statements. The following select statement shows the number of lunches that each employee will attend, but it does not account for Carol Rose or Paula Jacobs because they are not attending any lunches. Modify this statement to show that these two people will not attend any lunches.
select a.first_name,
a.last_name,
count(b.lunch_id) as number_of_lunches
from l_employees a
inner join l_lunches b
on a.employee_id = b.employee_id
group by a.first_name,
a.last_name;

Transcribed Image Text:Table Data Indexes Model
Query Count Rows Insert Row
EDIT
NNNNNNNNNN
201
202
203
204
205
206
207
208
209
210
EMPLOYEE_ID
Constraints Grants
Load Data
SUSAN
JIM
FIRST_NAME
MARTHA
ELLEN
HENRY
CAROL
DAN
FRED
PAULA
NANCY
Statistics
KERN
UI Defaults
BROWN
LAST_NAME
WOODS
OWENS
ROSE
PERKINS
SMITH
CAMPBELL
JACOBS
HOFFMAN
Triggers
EXE
SAL
SHP
SAL
SAL
ACT
SHP
SHP
MKT
SAL
L_EMPLOYEES
Dependencies SQL
DEPT_CODE
REST
HIRE_DATE
06/01/1998
08/16/1999
02/02/2009
07/01/2008
03/01/2006
12/01/2008
04/01/2008
Sample Queries
03/17/1999
02/16/2007
30
25
25
15
25
25
25
15
25
CREDIT_LIMIT
3484
8722
7591
6830
5286
2259
1752
3357
2974
PHONE NUMBER
201
201
202
202
203
203
201
203
^+
MANAGER_ID

Transcribed Image Text:Query Count Rows
RRRRRRRRRR
EDIT
Insert Row
1
2
3
4
6
7
8
9
12
13
15
16
17
20
21
Load Data
LUNCH_ID
ܡܚܐܚܡ ܫܝܚܕ ܒܝܚܝ ܫ ܕ ܕ ܚܕ ܒܚܐ
DIVER
11/16/2011
11/16/2011
11/16/2011
11/16/2011
11/16/2011
11/16/2011
11/25/2011
11/25/2011
11/25/2011
11/25/2011
11/25/2011
12/05/2011
12/05/2011
12/05/2011
12/05/2011
**bb****
LUNCH_DATE
L LUNCHES
expenserierea
201
207
203
204
202
210
201
208
204
207
205
201
210
205
203
sempre querem
EMPLOYEE ID
10/13/2011
10/13/2011
10/13/2011
10/13/2011
10/13/2011
10/13/2011
10/14/2011
10/14/2011
10/14/2011
10/18/2011
10/21/2011
10/21/2011
10/21/2011
10/24/2011
10/24/2011
DATE_ENTERED
+v
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Express the following SQL code in Relational Algebra form.SELECT *FROM COURSEWHERE (COURSE.COLLEGE <> ’Business’OR COURSE.COLLEGE <> ’Engineering’)AND COURSE.CREDIT = ’U’;arrow_forwardNeed help writing SQL statements for these, I'm having trouble with my returns. Explanation would help a lot.arrow_forwardThis is for SQL Give me a list of all of our vendors (by their name) and, if they have an invoice, give me the total number of invoices we have from them and the invoice date of their first invoice. The invoice date results should be provided in a way that shows the date only in the following format: mm/dd/yyyy (e.g. 10/04/2021)arrow_forward
- Based on SQL query knowledgearrow_forwardWrite a SQL code that returns the name of aircraft (MOD_NAME in MODEL table), number of trips each mode flied (based on the CHARTER table, name this Trip_Num), and Total distance of each mode (based on the CHARTER table, name this Total_Distance).arrow_forwarde a SQL query to display the customer ID, name, and order ID for all customer orders. For those customers who do not have any orders, include them in the display once.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education