Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Start Access, and then open the FirmPays database located here. Open the query n

ID: 3640002 • Letter: S

Question

Start Access, and then open the FirmPays database located here. Open the query named "Large Payments." View the query in SQL Format, and answer the following questions:

Which tables are used in the query?
Which fields are displayed in the query results?
What type of join, if any, is used between the tables?
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 1119 and DatePaid between 6-1 and 6-10
Orders results by payment date
Assi

Explanation / Answer

consider the simple query ( we are assuming you are using Firm_Pay as the table name ).
select AmtPaid,Firm_number,dataPaid,Payment_number from Firm_Pay where firm_number = 1119 and DatePaid < '01-06-10' and datepaid > '01-06-01';

Now come to the identification of elements with in sql query .
General Syntax for Select Statement is

Select [comma separated column_names ] from [ comma separated table_names ] where [ condition] [order by clause];

here comma separated column is the column names for which we want to see the values ( they must be explicitly mentioned as comma separated or we can use the * operator to Select all columns ).
comma separated table names indicates the tables from which we want to select the data which satisfies some predicate.
Next Comes the where clause which includes conditions which must be true for output of the query.
After where clause we can give the order by clause to sort the output based on the column or set of columns given in order by clause.

In the above example query :
a) tables used in query : Firm_Pay
b) Fields displayed in the result : AmtPaid,Firm_number,dataPaid,Payment_number
c) Join : there is no join since we are using only one table.for join we need more than one table.
d)Select criteria : where firm_number = 1119 and DatePaid < '01-06-10' and datepaid > '01-06-01'

Query Correspong to the question :

select AmtPaid,Firm_number,dataPaid,Payment_number from Firm_Pay where firm_number = 1119 and DatePaid < '01-06-10' and datepaid > '01-06-01' order by datepaid;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote