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)...
Given the following two related tables, write the SQL SELECT statement to solve the following queries...
Given the following two related tables, write the SQL SELECT statement to solve the following queries about developers (Dev) and programs (Prog). The id column in Dev and Prog is the relation between the two tables. Dev(id, name, dept, salary) Prog(id, title, language, lines, size); 1. List name of Devs who have written more than 1000 line programs 2. List title of all programs written in C++ language 3. List name of all developers who have written C++ programs
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.  
Open the World database on MySQL. Write the SQL code to display the name and population...
Open the World database on MySQL. Write the SQL code to display the name and population of all cities that meet two conditions: a.) the city has a population more than 100,000; and b.) the city name has (anywhere) the letter a followed by any character followed by the letter z. Use a regular expression for the second condition. Sequence the query results in descending order by population. What is the city with the largest population in the output?
1. Write a SELECT statement to count SKUs for each department, i.e., a table of two...
1. Write a SELECT statement to count SKUs for each department, i.e., a table of two columns, departments and their SKU counts. use cape_codd; select department, count(*) from sku_data group by department ; 2. List buyers who is responsible for at least two SKUs, in three columns, department, buyer, sku count. Sort buyers by their department names in ascending order. select department, buyer, count(sku) from sku_data group by buyer ; 3. Write a SQL statement which returns all the orders....