Import a data file from your computer
Download the file (DB 1 Tool Import File - Data.csv) attached to this page.
This is a Comma Separated File, known as a csv file.
This type of file can be read by most database programs and allows easy importing of data into the database.
The file looks like:
TOOL NAME,DESCRIPTION,SUPPLIER,UNIT PRICE,QUANTITY saw,circular,B & D,45.99,3 drill,variable speed,B & D,45.99,3 |
The first row contains the field (column) names, each field name is separated by a comma
The each row that follows contain the data for one record (row), the data is also separated by commas.
Once the file is on your computer, create a new Fusion Table. You will need to import the .csv file from your computer.
Add a calculated field
Create a new field: Edit>Add formula Column
Name: Invoice Total
Formula: 'UNIT PRICE'*QUANTITY
Set an appropriate format for this type of data.
Note:
- the field names are case-sensitive
- single quotes are needed if the field name contains spaces or special characters
- the formula is very similar to a spreadsheet formula, but a leading equal sign is not required
- logical (if statements) calculated fields can also be added
Simple Queries: Sorting Records
A query when a question is asked of a database. The data is converted into information.
Simple queries can be answered by sorting by different fields
Answer the following simple queries:
- Name the supplier, tool name and value for the invoice with the largest value
- Name the supplier, tool name and value for the invoice with the smallest value
- Name the supplier, tool name and value for the invoice with the largest quantity sold
Add a Summary
A summary can hold more than one for these queries.
Queries created by a summary tab can be more complex.
- for each supplier, determine the total of the Invoice Total
- for each supplier, determine the average Invoice Total
- for each tool name, determine the total of the Invoice Total
- for each tool name, determine the total number units sold
- for each tool name, determine the average unit price
Rename your Summary tabs to describe the information it contains
Note:
- Summary tabs only display 10 elements in the chart, all the data is on the left hand side of the window
Add a Filter
A filter can also be added.
Create a new Summary tab similar to #1 above (for each supplier, determine the total of the Invoice Total), but include a filter that only includes the supplier B & D