Explore BrainMass
Share

# SQL Query to Join Two Tables

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Create a query with the kudler_team_c database I attached.
This query should pull at least two tables together. So it needs to have the following:
USE
SELECT
FROM
GROUP BY

You can decide what tables to put together and what fields to pull out.

https://brainmass.com/computer-science/sql/sql-query-join-two-tables-153288

#### Solution Preview

This problem requires joining two tables together and using "group by" to create sensible query. The Chart_of_Accounts table holds a list of the different accounts in the database. Each account is linked to a property in the Property table using the Property_ID key.

For our query we will find the sum of the balances for ...

#### Solution Summary

In this solution I demonstrate how to join two tables together with a SQL query. The query also uses the GROUP BY function.

\$2.19
Similar Posting

## Writing SQL Queries Using a Database and Tables

Write SQL queries (SELECT statements) using BETWEEN, LIKE, UNION, and GROUP.

Using the database and tables (see attachment) write SQL INSERT statements to insert records into the employee table for the workers identified in the Employee Files for the administrative offices and the Del Mar location. Check your results by selecting all of the columns from both of your tables.

Using the database and tables (see attachment), write SQL queries using BETWEEN, LIKE, and UNION:

- Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection. (Use Emp_salary to restrict the data.)
- Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection. (Use Hire_date to restrict the data.)
- Write a SQL query that joins two tables in the example database and uses LIKE to restrict record selection. (Use Telephone_area_code to restrict data.)
- Write a SQL query that joins two tables in the example database and uses LIKE to restrict record selection. (Use Emp_age to restrict data.)
- Write a SQL query that uses UNION of the two tables to produce a combined result set.

Using the updated database that includes employees from administrative offices and the Delmar location, write the following queries using the SQL GROUP BY statement:

- Group employees by job classification: Select the employees' last names and group them by EEO_1_classification.
- Group employees by salary: Select the employees' last names and group them by Emp_salary.
- Group employees by salary within their job classification: Select the employees' last names and group them by Emp_salary within their EEO_1_Classification.
- Select the employees' last names and group them by salary within job titles that are grouped into exempt and non-exempt.

In Microsoft SQL Server Management Studio, save your SQL statements as .SQL files. Save your SQL output as .RPT files. You will need to post both types of files (.SQL and .RPT).

View Full Posting Details