Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help as soon as possible on these SQL statements as. I have provided the tables containing all of the data from the entire database

Need help as soon as possible on these SQL statements as. I have provided the tables containing all of the data from the entire database below the questions. I'm using mySQL Workbench as shown below.

Example 1 Using IN Operator to create a subquery from two tables

From your last assignment you should have a subquery that use the IN operator. Place that statement here. SELECT Cust_ID, First_Name, Last_Name FROM CUSTOMER WHERE Cust_ID IN (SELECT Cust_ID FROM INVOICEs WHERE Invoice_date = '2021-11-15');

SQL STATEMENT:

Example 2 Using the EXIST Operator

Create the same results as #1 using the EXIST operator.

SQL STATEMENT:

Example 3 Using UNION operator

Create two queries that SELECTs the same columns from a table. Use the IN operator for one and the LIKE operator for the other.

Use the UNION operator to combine the results together from the 2 SELECT statements.

1ST SQL STATEMENT:

2ND SQL STATEMENT:

3RD SQL STATEMENT:

Example 4 Use ANY or ALL keyword and alternative solution aggregate function

Create a subquery using either the ANY or ALL keyword. Then produce the same results with either the MIN or MAX function in the subquery.

SQL STATEMENT using either ANY or ALL:

SQL STATEMENT using MIN or MAX:

image text in transcribed

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Database: Chapter 5 Individual Project Part 1 Complete the following exercises using your individual database that you have loaded in either Oracle or MySQL. Fill in the "SQL Statement" part of the chart below with the query that you use in either MySQL Workbench or Oracle Application Express. Once the query has run correctly and provided the results, take a screen snip of the results, and copy into the chart below under Results. Answer other questions as asked. Save this completed Word document and submit to appropriate dropbox on myHills. 10 points Workbench A Local instance wampmyseld54 x File Edit View Query Database Server Tools Scripting Help SQL File Denim Navigator SCHEMAS Gerbjects ijwb_player_database kimtay sys 10 SQL Addition 19.mpte Automatic context help is disabled. Use the toolbart manually get help for the current caret position or to toggle automatic help. MySQL Workbench 8.0 Version 6.32 buld107000 CE (4) Community Grace CEME OCH ORACLE Administration Schemas Information No object selected Context Help Snippets Dupu Action Tume Acson Wessage Duration / Fish Object Info Session BALHO Dont Limit @ 1 2009 select * from account; 1. 01002 DOC Nav SCHEMAS Filter objects vijwtb_player_database Tables account Columns STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID EMAIL_ADDRESS PHONE_NUMBER DATE_OF_BIRTH Indexes Foreign Keys Triggers donations Columns STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID TEAM_NAME DONATION_AMOUNT DATE Indexes Foreign Keys Triggers limits o Columns STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID TEAM_NAME BALLOONS Result Grid Filter Rows: Edit: 3 Export/Import: Wrap Cell Content: 1A STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID EMAIL_ADDRESS PHONE_NUMBER DATE_OF_BIRTH STEAM_0:1:12438801 01001 01 carlcm01@example.com 1230260 190 01012020 STEAM_0:2:12438802 02 caricmo2@example.com 1230250390 01032020 STEAM_0:3:12438803 01030 03 carlcm03@example.com 1230240490 01042020 STEAM_0:4:12438804 01004 04 carlcm04@example.com 1230230590 01052020 STEAM_0:5:12438805 01005 05 carlcm05@example.com 1230220690 01062020 STEAM_0:6:1243880600016 06 carlcm06 @example.com 1230210790 01072020 STEAM_0:7:12438807 00007 07 carlcm07@example.com 1230200890 01082020 STEAM_0:8:12438808 00008 08 caricm08@example.com 1230 190990 01092020 STEAM_0:9:1243880900009 09 carlcm09 @example.com 1230181090 01102020 STEAM_0:1:12438810 00010 10 carlcm 10 @example.com 1230170190 01012020 STEAM_0:2:12438811 01011 11 carlcm 11@example.com 1230 160290 01022020 STEAM_0:5:12438812 00112 12 carlcm 12@example.com 1230 150390 01032020 STEAM_0:1:12438813 00013 13 carlcm 13 @example.com 1230140490 01042020 STEAM_0:6:12438814 00014 14 carlcm 14@example.com 1230130590 01052020 STEAM_0:1:12438815 00015 15 carlem 15@example.com 1230120690 01062020 STEAM_0:7:1243881600216 16 carlcm 16 @example.com 1230110190 01012020 STEAM_0:1:12438817 00017 17 carlcm 17@example.com 1230100390 01032020 STEAM_0:1:12438818 00018 18 carlcm 18 @example.com 1230090490 01042020 STEAM_0:9:12422819 00019 19 carlcm 19 @example.com 1230080590 01052020 STEAM_0:1:12438020 00320 20 carlcm 20 @example.com 1230070690 01062020 STEAM_0:5:12430821 00021 21 carlem 21 @example.com 1230060790 01072020 STEAM_0:1:12438822 00022 22 carlcm 22@example.com 1230050890 01082020 STEAM_0:4:12438823 00023 23 carlcm 23@example.com 1230040990 01092020 STEAM_0:1:12438024 00524 24 carlcm 24@example.com 1230031090 01102020 STEAM_0:9:12438825 00025 25 carlcm 25@example.com 1230020190 01012020 STEAM_0:7:12438826 00026 26 carlcm 26 @example.com 12300 10290 01022020 NULL NULL MULL Administration Schemas Information Column: ADDRESS NULL NULL NULL Collation: latin1_swedish_ci Dont Limit 1. select * from account; select * from donations; 2. SCHEMAS a Filter objects ijwtb_player_database Tables account Columns STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID EMAIL_ADDRESS PHONE_NUMBER DATE_OF_BIRTH Indexes Foreign Keys Triggers donations Columns STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID TEAM_NAME DONATION_AMOUNT DATE Indexes Foreign Keys Triggers Result Grid 1 Filter Rows: Edit: Export/Import: Wrap Cell Content: JA STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID TEAM_NAME DONATION_AMOUNT DATE STEAM_0:7:12438807 00007 07 Diamond Supporter 100.00 12-26-2020 STEAM_0:8:12438808 00008 08 Ruby Supporter 100.01 12-26-2020 STEAM_0:9:12438809 00009 09 Emerald Supporter 100.02 12-26-2020 STEAM_0:1:12438810 00010 10 Sapphire Supporter 100.03 12-26-2020 STEAM_0:2:12438811 01011 11 Crystal Supporter 100.04 12-26-2020 NULL NULL NULL NULL NULL NULL SQL File & Navigator SCHEMAS a ter objects 19 Dont Lime select from account select from donations; select * fron limits: 2. 3. 1 E Triggers limits Columns STEAM ID NUMBER CURRENT_SERVER_HOURS ENUM_ID TEAM_NAME BALLOONS BUTTONS DYNAMITE EFFECTS EMITTERS HOVERBALLS LAMPS LIGHTS NPCS PROPS RAGDOLLS SENTS SPAWNERS THRUSTERS TURRETS VEHICLES WHEELS SWEPS DATE Indexes Foreign Keys B Triggers promotions de Columns Context Help Snippets Dupu Action Tume Acson Wessage Duration / Fish Object Info Session BALHO Dont Limit @ 1 2009 select * from account; 1. 01002 DOC Nav SCHEMAS Filter objects vijwtb_player_database Tables account Columns STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID EMAIL_ADDRESS PHONE_NUMBER DATE_OF_BIRTH Indexes Foreign Keys Triggers donations Columns STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID TEAM_NAME DONATION_AMOUNT DATE Indexes Foreign Keys Triggers limits o Columns STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID TEAM_NAME BALLOONS Result Grid Filter Rows: Edit: 3 Export/Import: Wrap Cell Content: 1A STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID EMAIL_ADDRESS PHONE_NUMBER DATE_OF_BIRTH STEAM_0:1:12438801 01001 01 carlcm01@example.com 1230260 190 01012020 STEAM_0:2:12438802 02 caricmo2@example.com 1230250390 01032020 STEAM_0:3:12438803 01030 03 carlcm03@example.com 1230240490 01042020 STEAM_0:4:12438804 01004 04 carlcm04@example.com 1230230590 01052020 STEAM_0:5:12438805 01005 05 carlcm05@example.com 1230220690 01062020 STEAM_0:6:1243880600016 06 carlcm06 @example.com 1230210790 01072020 STEAM_0:7:12438807 00007 07 carlcm07@example.com 1230200890 01082020 STEAM_0:8:12438808 00008 08 caricm08@example.com 1230 190990 01092020 STEAM_0:9:1243880900009 09 carlcm09 @example.com 1230181090 01102020 STEAM_0:1:12438810 00010 10 carlcm 10 @example.com 1230170190 01012020 STEAM_0:2:12438811 01011 11 carlcm 11@example.com 1230 160290 01022020 STEAM_0:5:12438812 00112 12 carlcm 12@example.com 1230 150390 01032020 STEAM_0:1:12438813 00013 13 carlcm 13 @example.com 1230140490 01042020 STEAM_0:6:12438814 00014 14 carlcm 14@example.com 1230130590 01052020 STEAM_0:1:12438815 00015 15 carlem 15@example.com 1230120690 01062020 STEAM_0:7:1243881600216 16 carlcm 16 @example.com 1230110190 01012020 STEAM_0:1:12438817 00017 17 carlcm 17@example.com 1230100390 01032020 STEAM_0:1:12438818 00018 18 carlcm 18 @example.com 1230090490 01042020 STEAM_0:9:12422819 00019 19 carlcm 19 @example.com 1230080590 01052020 STEAM_0:1:12438020 00320 20 carlcm 20 @example.com 1230070690 01062020 STEAM_0:5:12430821 00021 21 carlem 21 @example.com 1230060790 01072020 STEAM_0:1:12438822 00022 22 carlcm 22@example.com 1230050890 01082020 STEAM_0:4:12438823 00023 23 carlcm 23@example.com 1230040990 01092020 STEAM_0:1:12438024 00524 24 carlcm 24@example.com 1230031090 01102020 STEAM_0:9:12438825 00025 25 carlcm 25@example.com 1230020190 01012020 STEAM_0:7:12438826 00026 26 carlcm 26 @example.com 12300 10290 01022020 NULL NULL MULL Administration Schemas Information Column: ADDRESS NULL NULL NULL Collation: latin1_swedish_ci Dont Limit 1. select * from account; select * from donations; 2. SCHEMAS a Filter objects ijwtb_player_database Tables account Columns STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID EMAIL_ADDRESS PHONE_NUMBER DATE_OF_BIRTH Indexes Foreign Keys Triggers donations Columns STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID TEAM_NAME DONATION_AMOUNT DATE Indexes Foreign Keys Triggers Result Grid 1 Filter Rows: Edit: Export/Import: Wrap Cell Content: JA STEAM_ID_NUMBER CURRENT_SERVER_HOURS ENUM_ID TEAM_NAME DONATION_AMOUNT DATE STEAM_0:7:12438807 00007 07 Diamond Supporter 100.00 12-26-2020 STEAM_0:8:12438808 00008 08 Ruby Supporter 100.01 12-26-2020 STEAM_0:9:12438809 00009 09 Emerald Supporter 100.02 12-26-2020 STEAM_0:1:12438810 00010 10 Sapphire Supporter 100.03 12-26-2020 STEAM_0:2:12438811 01011 11 Crystal Supporter 100.04 12-26-2020 NULL NULL NULL NULL NULL NULL SQL File & Navigator SCHEMAS a ter objects 19 Dont Lime select from account select from donations; select * fron limits: 2. 3. 1 E Triggers limits Columns STEAM ID NUMBER CURRENT_SERVER_HOURS ENUM_ID TEAM_NAME BALLOONS BUTTONS DYNAMITE EFFECTS EMITTERS HOVERBALLS LAMPS LIGHTS NPCS PROPS RAGDOLLS SENTS SPAWNERS THRUSTERS TURRETS VEHICLES WHEELS SWEPS DATE Indexes Foreign Keys B Triggers promotions de Columns

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions