Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
PLEASE DO NOT USE AI TO SOLVE THIS carefully read all instructions and complete the questions. Be sure to complete the readings and ePortfolio before
PLEASE DO NOT USE AI TO SOLVE THIS carefully read all instructions and complete the questions. Be sure to complete the readings and ePortfolio before proceeding to the questions. Instructions Use the school database to answer the questions. The database creation file is available on ELMS. Submit your answers as one SQL file via ELMS. Name your file in the following format: yourlastnameAquery.sql for example, DSmithAquery.sql State your SQL file answers clearly by numbering them with comments. For example: sql Copy code Q SELECT FROM vendors; Ensure that your query results replicate the sample result sets shown in the figures exactly matching their column headers and format aspects. You are not allowed to use exact match conditions such as: WHERE lastname 'Smith' WHERE lastname 'Smith' You are allowed to use inequality conditions such as: WHERE lastname 'Smith' WHERE lastname 'Smith' WHERE lastname 'Smith' WHERE lastname 'Smith' You may not use them to filter primary key values. You are allowed to use filtering conditions to include or exclude NULL values. For example: WHERE date IS NOT NULL WHERE address IS NULL Contact the instructors immediately if you think there is an error in any of the questions, or if more clarification is needed. Ensure that your queries replicate the sample result sets shown in the figures exactly matching their column headers and format aspects. For this assignment, you are not allowed to use the following keywords: BETWEEN, LIKE, LIMIT, IFNULL. This transcription captures the instructions and information provided in the images. Q Simple SELECT Query with Sorting points Write a SELECT query that returns the address columns street city, state, country, zip code main phone number, and local phone number from the addresses table. Filtering is not used, so all rows should be returned. The query must replicate the result set shown in the figure below. NOTE: The result set is sorted on columns. Unsorted columns may be displayed in an order different from the result set shown below. For more information, read the "Indeterminate Sorting in SQL page in the Week module. Hint: Check the bottom "Action Output" panel in Workbench under the "Response" tab to see how many rows were returned. This is also where any syntax errors will be shown. yaml Copy code street city state country zipcode mainphone localphone North Crossing Lekas NULL Albania Lien Way Batna NULL Algeria Fallview Alley Camabatela NULL Angola NULL Monument Trail Alta Gracia NULL Argentina Warrior Lane Carlos Tejedor NULL Argentina B Dennis Alley Sylhet NULL Bangladesh Anhalt Center Cachoeira do Sul NULL Brazil Rockefeller Way Rio de Janeiro NULL Brazil Center Junction Mutengene NULL Cameroon NULL Knutson Crossing Cowansville QC Canada JK Manitowish Trail Fuqing NULL China Bellgrove Street Urban NULL China Melrose Alley Xingtai NULL China Riverside Parkway Bogota NULL Colombia Texas Pass Guatape NULL Colombia Vernon Avenue Haraida NULL Japan Spohn Pass Ibadan NULL Nigeria Cody Hill Yanac NULL Peru Rigney Way Afrin NULL Syria Warbler Circle Si Wilai NULL Thailand Oneill Point Ankara NULL Turkey Prairie Rose Circle Ashgabat NULL Turkmenistan rows returned. Only samples from the beginning and end of the result set are shown. Image Transcription Q SELECT Query with Column Aliases and Formatting points Using the addresses table, write a SELECT query that replicates the result set shown in the figure below.
PLEASE DO NOT USE AI TO SOLVE THIS
carefully read all instructions and complete the questions. Be sure to complete the readings and ePortfolio before proceeding to the questions.
Instructions
Use the school database to answer the questions. The database creation file is available on ELMS.
Submit your answers as one SQL file via ELMS. Name your file in the following format: yourlastnameAquery.sql for example, DSmithAquery.sql
State your SQL file answers clearly by numbering them with comments. For example:
sql
Copy code
Q
SELECT FROM vendors;
Ensure that your query results replicate the sample result sets shown in the figures exactly matching their column headers and format aspects.
You are not allowed to use exact match conditions such as:
WHERE lastname 'Smith'
WHERE lastname 'Smith'
You are allowed to use inequality conditions such as:
WHERE lastname 'Smith'
WHERE lastname 'Smith'
WHERE lastname 'Smith'
WHERE lastname 'Smith'
You may not use them to filter primary key values.
You are allowed to use filtering conditions to include or exclude NULL values. For example:
WHERE date IS NOT NULL
WHERE address IS NULL
Contact the instructors immediately if you think there is an error in any of the questions, or if more clarification is needed.
Ensure that your queries replicate the sample result sets shown in the figures exactly matching their column headers and format aspects.
For this assignment, you are not allowed to use the following keywords: BETWEEN, LIKE, LIMIT, IFNULL.
This transcription captures the instructions and information provided in the images.
Q Simple SELECT Query with Sorting points
Write a SELECT query that returns the address columns street city, state, country, zip code main phone number, and local phone number from the addresses table. Filtering is not used, so all rows should be returned. The query must replicate the result set shown in the figure below.
NOTE: The result set is sorted on columns. Unsorted columns may be displayed in an order different from the result set shown below. For more information, read the "Indeterminate Sorting in SQL page in the Week module.
Hint: Check the bottom "Action Output" panel in Workbench under the "Response" tab to see how many rows were returned. This is also where any syntax errors will be shown.
yaml
Copy code
street city state country zipcode mainphone localphone
North Crossing Lekas NULL Albania
Lien Way Batna NULL Algeria
Fallview Alley Camabatela NULL Angola NULL
Monument Trail Alta Gracia NULL Argentina
Warrior Lane Carlos Tejedor NULL Argentina B
Dennis Alley Sylhet NULL Bangladesh
Anhalt Center Cachoeira do Sul NULL Brazil
Rockefeller Way Rio de Janeiro NULL Brazil
Center Junction Mutengene NULL Cameroon NULL
Knutson Crossing Cowansville QC Canada JK
Manitowish Trail Fuqing NULL China
Bellgrove Street Urban NULL China
Melrose Alley Xingtai NULL China
Riverside Parkway Bogota NULL Colombia
Texas Pass Guatape NULL Colombia
Vernon Avenue Haraida NULL Japan
Spohn Pass Ibadan NULL Nigeria
Cody Hill Yanac NULL Peru
Rigney Way Afrin NULL Syria
Warbler Circle Si Wilai NULL Thailand
Oneill Point Ankara NULL Turkey
Prairie Rose Circle Ashgabat NULL Turkmenistan
rows returned. Only samples from the beginning and end of the result set are shown.
Image Transcription
Q SELECT Query with Column Aliases and Formatting points
Using the addresses table, write a SELECT query that replicates the result set shown in the figure below.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started