Question

Write and run the SQL to list the ClassID, ClassDescription, ClassroomID, BuildingName  and Capacity for all classes,...

  1. Write and run the SQL to list the ClassID, ClassDescription, ClassroomID, BuildingName  and Capacity for all classes, using the inner join [matching on ClassroomID] to extract variables from the BSU_Class and BSU_Classrooms tables.

Sort the output in ascending sequence by ClassID and Building name

Homework Answers

Answer #1

This query will return the list of the ClassID, ClassDescription, ClassroomID, BuildingName  and Capacity for all classes, using the inner join:

SELECT BSU_Class.ClassID, BSU_Class.ClassDescription, BSU_Class.ClassroomID, BSU_Classrooms tables.BuildingName, BSU_Class.Capacity

FROM BSU_Class

INNER JOIN BSU_Class ON  BSU_Class.ClassroomID =  BSU_Classrooms tables.ClassroomID

ORDER BY BSU_Class.ClassroomID ASC ,  BSU_Classrooms tables.ClassroomID ASC;

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a SQL statement which joins the parts table with the supplier table and lists the...
Write a SQL statement which joins the parts table with the supplier table and lists the part_name, supplier_name for all parts in the part table. The supplier_id column in the suppliers table is the primary key in the suppliers table, and this key has been exported to the parts table where it is a foreign key. You should use an inner join for this query. Write a SQL statement which joins the parts table with the suppliers table and lists...
For sqlite: Write a single SQL statement to list all the tracks that do not have...
For sqlite: Write a single SQL statement to list all the tracks that do not have the exact word 'time' (including both upper and lower cases) as part of the name in the Track table, but they have 'time' being part of a word in the name. For instance, it should include track names with words like 'wartime' or 'times' in the output I have to find a way to limit the exact word but the word should be part...
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table....
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table. SQL provides two different techniques for querying data from multiple tables: • The SQL subquery • The SQL join As you will learn, although both work with multiple tables, they are used for slightly different purposes. We used WMCRM database which is what we created in Lab 4. Here is the summary of the database schema (where schema is used in its meaning of...
implement in Oracle Sql please 5) Write a SELECT statement that answers this question: Which products...
implement in Oracle Sql please 5) Write a SELECT statement that answers this question: Which products have a list price that’s greater than the average list price for all products? Return the product_name and list_price columns for each product. Sort the results by the list_price column in descending sequence.
Assignment 2 Instructions You need to access to the database and write SQL queries on the...
Assignment 2 Instructions You need to access to the database and write SQL queries on the following site: https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in 1. Use INNER JOIN to create a report. In this report, list each customer’s CustomerID, CustomerName, and their each OrderID and each order’s OrderDate, if the customer has ever placed an order. You should use the Customers table and the Orders table in the database to complete this query.   2. Use INNER JOIN to create a report. In this report, list...
Translating MongoDB Queries to SQL - WILL UPVOTE!! 1. Write the equivalent sql queries for all...
Translating MongoDB Queries to SQL - WILL UPVOTE!! 1. Write the equivalent sql queries for all mongoDB queries. The following is an example of what you are asked to do. Assume the collection name is the table name in an sql database. Example: MongoDB Query: db.zips.aggregate([ {$match: {state: "MO"}}, {$group: {_id: "$city", totalPop: {$sum: "$pop"}}}, {$sort: {totalPop: -1}}, {$limit: 10} ]) SQL Result: Select city, SUM(pop) AS "totalPop" From zips Where state = "MO" Group By city Order By SUM(pop)...
Using CIS495 sample database, write the SQL query: a. In the orderdetails table, list the unique...
Using CIS495 sample database, write the SQL query: a. In the orderdetails table, list the unique order which has more than 3 productCode in each order. b. List the customer name and address who purchase more than 5 items (ProductCode) in the order.  
Consider the following data. (It is not necessary to run the code and upload the output)                           &nbsp
Consider the following data. (It is not necessary to run the code and upload the output)                                                                                                                [10 Marks] STUDENT StudentID SName Gender Age ClubID 3234 Alfred Smith Male 20 BSK 2244 McJohnson Robert Male 22 2389 Jessica Low Female 20 JPA 4211 Roland Devingo Male 24 4383 Jane Usa Khan Female 21 BKY 4450 Elaine Fong Female 20 JPA CLUB ClubID CName Founded Budget BKY Bakery Club 2010 2546 PDC Photomedia and Design 2005 1345 JPA Japanese Anime 2009 3453...
Microsoft SQL Server Management Studio 1. Write SQL statements to insert, update, and delete a record...
Microsoft SQL Server Management Studio 1. Write SQL statements to insert, update, and delete a record in each of the Clients, Assist, Task, Outreach, and Specialist tables. Finish by inserting records into the tables (sample data follows). 5 points 2. Write Select statements to organize data from different tables. 4 points each Select all clients who have had an assist; include client name, assist date and type. List all assists including the name of the Specialist. List client names having...
Save your select statements as a script. Place the semicolon at the end of each SQL...
Save your select statements as a script. Place the semicolon at the end of each SQL statement. Please number your select statements from 1 to 8 in your script and comment out each number. Include your name and student number as a comment at the top of your script. The name of the script has to be Assignment1_JohnSmith. Instead of JohnSmith use your First Name and Last Name. Upload your script trough Blackboard. Use SQL Developer to create the My...