Unit 9 Exercise Help. Crosstab queries


Exercise 1: Distributer

1 Position yourself in the Queries tab in the Database window of the Cars database.

2 Click on the button and select the Crosstab Query Wizard option in the dialogue box that appears.

The first window of the wizard will appear, where we indicate the source of the data.

3 Select the Sold cars table. All the information we need is in this table.

4 Click on the Next button.The window will appear in which to introduce the row heading.

5 Click on the Make field to select it.

6 Click on the button.

7 Click on the Next button. The window will appear in which to introduce the column heading.

8 Click on the Colour field.

9 Click on the Next button.

10 Click on the License field and then Click on the Count function if they are not selected yet.

11 Click on the Next button. The window will appear in which to introduce the name of the query.

12 Type Cross make-colour.

13 Click on the Finish button. The result of the query will appear.

14 Close the query.

 

Exercise 2: Clinic

 

Before beginning with the crosstab query we need to create the query that will be the source.

1 Create a query that combines the Entries, Patients, and Doctors, include all the fields of the three tables in the query, we will only need Entry Number , Doctor Speciality , and Patient City , but this way the query can be used for other queries.

2 Save the query with the name Entries-Patients-Doctors.

 

Now we can create the crosstab query.

1 Position yourself in the Queries tab of the Database window in the Clinic database.

2 Click on the button and select the Crosstab query wizard option in the dialogue box that appears.

The first window of the wizard will appear, where we indicate the source of the data.

3 Click Queries option in View section and select the Entries-Patients-Doctors query.

4 Click on the Next button.The window will appear in which to introduce the row header.

5 Click on the Patient City field to select it.

6 Click on the button.

7 Click on the Next button.The window will appear in which to introduce the column header.

8 Click on the Doctor Speciality field.

9 Click on the Next button.

10 Click on Entry Number and then on the Count function.

11 Click on the Next button. The window will appear in which to introduce the name of the query.

12 Type Cross Entries-Patients-Doctors.

13 Click on the Finish button. The result of the query will appear.

14 Close the query.

 



 
Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited. April-2006.