Explore BrainMass
Share

SQL Select statements

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

Word document, SQL Statement (zipped)

Start Access, and then open the FirmPays database located in the LE4 folder extracted from the zip file in IP3. Open the query named "June 2". View the query in SQL, and answer the following questions:
1. Which tables are used in the query?
2. Which fields are displayed in the query results
3. What type of join is used between the tables
4. What selection criteria are used?
Then write a query in SQL in the FirmPays database that fulfills the following parameters:
? Displays the AmtPaid, Firm#, DatePaid, and Payment#
? Selects firm number 1115 and DatePaid between 6-1 and 6-10
? Results should be ordered by payment date
Deliverables: answers to questions 1-4, your SQL statement.

If possible, provide APA references on this project and the one before it.

© BrainMass Inc. brainmass.com October 17, 2018, 12:39 am ad1c9bdddf
https://brainmass.com/computer-science/sql/sql-select-statements-303585

Attachments

Solution Preview

Here is the SQL query named "June 2":

SELECT Payment.[Payment#], Payment.AmtPaid, Firm.FirmName
FROM Firm INNER JOIN Payment ON Firm.[Firm#] = Payment.[Firm#]
WHERE (((Payment.DatePaid)=#6/2/2001#));

1. Which tables are used in the query?
Firm and Payment

2. ...

Solution Summary

Solution is detailed SELECT statements as described as required for the FirmPays database.

$2.19
Similar Posting

A detailed example of a SQL select statement using GROUP BY

The schema of the DB is as follows:

Department(DeptNum, Descrip, Instname, DeptName, State, Postcode)
Academic(AcNum, *DeptNum, FamName, GiveName, Initials, Title)
Paper(PaNum, Title)
Author(*PaNum, *AcNum)
Field(FieldNum, ID, Title)
Interest(*FieldNum, *AcNum, Descrip)

Question 6:
Which fields have interests shared by academics from the same department? Output the field number, field ID and title, and the total number of academics who have interests.

I'm struggling with the conditions in the first part of the question.

Thanks Mick

View Full Posting Details