0% found this document useful (0 votes)
111 views13 pages

Create A Database Apex Ltd. A. Create A Table of Customers

The document outlines steps for creating databases and tables, entering records, and writing queries for an inventory management system. It includes instructions for creating tables for customers, inventory, invoices, payments, sales items, and sales orders. Example queries demonstrate how to retrieve customer records by state and credit limit, find orders within a date range, get inventory by category, and more. Later questions involve additional queries for accounting, sales analysis, and graphical reporting.

Uploaded by

Kunish Garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views13 pages

Create A Database Apex Ltd. A. Create A Table of Customers

The document outlines steps for creating databases and tables, entering records, and writing queries for an inventory management system. It includes instructions for creating tables for customers, inventory, invoices, payments, sales items, and sales orders. Example queries demonstrate how to retrieve customer records by state and credit limit, find orders within a date range, get inventory by category, and more. Later questions involve additional queries for accounting, sales analysis, and graphical reporting.

Uploaded by

Kunish Garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Create a Database Apex Ltd.

A. Create a table of Customers


B. Create a table of Inventory

C. Create a table of Invoice


D. Create a table of Payments
E. Create a table of Sales Items Description
F. Create a table of Sales Order
Enter a Records into tables

A. Customer table
B. Inventory Table
C. Invoice Table
D. Payment Table

E. Sales Items Description


F. Sales Order Table
Chapter 3
1. Apex limited is launching a new production unit in “California” which will also focus on
some new products. To the customer from “California” the value CA in the criteria for
the state field needs to be specified. Here, CA is a literal operand and is typed direct in
query criteria.

2. Find all the records from customer table whose state = “CA” AND Credit limit is greater
than 500000.

3. Find all the records from customer table whose state = “CA” OR Credit limit is greater
than 500.

4. Find all the records from Sale orders table whose has placed the order in between Jan
2010 to March 2010.

5. All inventory details from the “Car”, “snowmobile” and “Boat” categories along with the
details of the order placed for them. Using Inventory Table.

6. A contact list for all customer whose first name starts with A, M or R. Using Customer
Table.

7. A list of all the product that were sold with a quantity greater than 5 or the price greater
than 1000. Using Sales Items Description Table

8. Show all the records from table [Sales Order Table] by adding the 7 days in Sales Date.
[using DateAdd function]

9. Display the full name by adding the First & Last name using the (+) sign. (Using
Customer Table.)

10. Display a list of all the orders from table [Sales Order Table] which have not been
shipped. (check for orders with NULL shipped date).

11. Display the length of the first name by using table customer. [by using len fucniton]

12. Display the revere order of the last name by using table customer. [by using strreverse
function]

13. Show all the records from the [Sales Items Description Table] Quarter wise using
datepart.
Chapter 1
1. Rohit is an Accountant in Apex Ltd. At the closing of the quarter, he has to check the Invoices for
which the payments are made in Quarter-I of year 2014. ( Using Payment Table & Invoice
Table)

1.1 Rohit is an Accountant in Apex Ltd. At the closing of the year, he has to check the Sales Order
for which the Payments Term is Cash. On behalf of the result show all details of the customer.
(Using Sales Order & Customer Table)

2. Ankur Mathur, Sales Head of Apex Ltd. wishes to reduce the production of few products. To
analyse which products should not be produced further, he needs to find out the products
.which have not been ordered so far. (Using Inventory & Sales Item Description tables)

3. Varun Gupta, a Chartered Accountant in Apex Ltd., is required to audit the invoices and the
payments. While tracking the payments he noticed that multiple invoices have been created for
a single sales order. To sort out the things, he wishes to check all the sales order having
duplicate invoices. (Using table Invoice Table)

4. The Country Head in Apex Ltd. wishes to compute the sales volume of its products. He also
would like to see the number of orders placed for each product, so that they can focus on
products with greater sales volume. ( using Inventory & Sales item Description Table)

Note: - Select the fields Category and Item Number from Inventory table &
Sales Order Number from Sales Item Description table.

5. Considering the problem of retrieving Sales volume of Products as discussed in Q. No-4, Country
Head wants to have a look at only the products with at least an order count of two. The
management authority also thought of maintaining the products which are cheaper and have
more sales volume.

6. The company Apex Ltd. wishes to revise the credit limit of its customers. For this purpose,
Ashish, the PRO needs a summary report that indicates the count of orders placed by each
customer in every month of first Quarter of the year 2014.

Note: - Steps to provide the criteria for last financial year


Double-click the column Sales Date from table Sales Order such that it appears in
Field tab. Change the value of Total tab to Where and add the expression Between
1/1/2014 AND 30/4/2014 to the Criteria tab.
7. The Head of Sales Department in Apex Ltd. has demanded a Sales Summary report for review.
The following are the desired requirements: the sales of the products can be viewed in terms of
Year, Quarters and Months; the report should enable the user to view the products filtered by
Category.

Solution:-

1. Open the Query Design window, by clicking Create -> Queries -> Query Design
2. Select the Inventory, Sales Item Description and Sales Order tables from Show
Table window and click Add
3. Select the columns Category and Item Number from Inventory Table and drag them
to the columns tab. Similarly, select column Sales Date from table Sales Order and
drag it to the columns tab.
4. Now to compute the Total Sales of the Product, multiply Quantity * Price and create
a new column. Write the expression Total Sales: [Quantity]*[Price] in the Field tab of
the next column.
5. Open the query in PivotTable View by clicking PivotTable View from Home ->
Views
6. A PivotTable view of the query having:
 Category field as a filter
 Product field on row
 Year, Quarter and Month on columns
 Total Sales (which is computed as Quantity sold into Product cost) displayed as
values.

8. Considering the Summary Sales Report discussed in Q. No-7, a graphical


representation of the same data is required.

Solution
To represent the data graphically, we need to create a PivotChart. For this purpose, we
first create a query to display Summary Report and then create a PivotChart based on
that query. In the Pivot Chart, the fields will be placed as:
 Category as Filter Field
 Years & Quarters field on X-Axis
 Total Sales on Y-Axis
 Item Number as Series Field

You might also like