Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write SQL queries based on following information: create table tblCitation ( CitiationNum char(20), CitationDate date, citiationTime date, LicenseNum char(20), AnimalType char(20), violatioNCode char(20), primary key

Write SQL queries based on following information:

create table tblCitation ( CitiationNum char(20), CitationDate date, citiationTime date, LicenseNum char(20), AnimalType char(20), violatioNCode char(20), primary key (CitationNum) );

create table tblLicense ( LicenseNum char(20), AnimalType char(10), OwnerFirst char(20), OwnerLast char(20) primary key (LicenseNum) );

create tblPayment ( PaymentID integer, PaymentAmt currency, PaymentDate date, CitationNum char(20) );

1. Create and save a query named qryResidentCitations that displays, in order, all fields from the tblCitation table, and the OwnerFirst and OwnerLast fields from the tblLicense table.

2. Save the qryResidentCitations query as qryAllCitations, and then modify the new query to use an outer join to include all records from the tblCitation table and the matching records from the tblLicense table.

3. Create and save a query named qryTotalPaymentsByDate that displays the PaymentDate field and the sum of the PaymentAmt field from the tblPayment table. For the total field, use a Caption value of Total Payments. Sort the query in ascending order by PaymentDate

4. Create a find duplicates query based on the tblCitation table. Select LicenseNum as the field that might contain duplicates, and select all the other fields in the table as additional fields in the query recordset

5. Make a copy of the qryAllCitations query, save the copy as qryAllCitationsParameter, and then modify the new query to display records for aViolationCode field value that the user enters.

6. Create and save a query named qryCitationsAndPayments that displays, in order, all fields from the tblCitation table, and the PaymentID, PaymentAmt, and PaymentDate fields from the tblPayment table. Include all records from the tblCitation table and only the matching records from the tblPayment table

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is the role of a paralegal in the litigation process?

Answered: 1 week ago

Question

are a form function that help you select, edit, or delete a record.

Answered: 1 week ago