1. Meet the Records
The sales coordinator has a customer name on a request. Before discussing an order, you need to find the right customer and understand what its record can tell you. Start with one row, not a sales total.
Your task. Recognize one customer record, its identifier, and its descriptive fields.
Which parts of a customer row identify and describe it?
Reading guide: Three attributes describe one customer row; they are not three tables or three events.
Read the figure in words
- A key identifies the record: CustomerID: 130; Used to link customer records
- A name describes the customer: Jones, Richardson and Beard; CustomerName
- A segment classifies it: Design Trade; CustomerSegment
Three attributes describe one customer row; they are not three tables or three events.
Before You Start
Complete Set Up Excel or Set Up SQL. You need only the Customer table.
- Excel
- SQL
Use the CustomerData table imported during setup.
Open the SQLite database in your SQL tool. Save this lesson's statements as Lesson01.sql. Run each supplied query separately, using its filters to identify the records and dates for that step.
1. Find the Customer
A customer identifier is the stored link used by other records. A customer name is a description that helps a person recognize the organization.
- Excel
- SQL
- Click inside
CustomerDatain your Lesson01 workbook. - Open the filter arrow on
CustomerID. Clear Select All, select 130, and choose OK. - Find
CustomerName,CustomerSegment, andCityon the same row. Scroll horizontally without losing the identifier. - On a separate sheet named
Notes, write the identifier, name, and segment. Leave the source columns unchanged.
Copy the whole query into Execute SQL, then run it. SELECT names the columns to display, FROM names the table, and WHERE retains the matching customer.
SELECT CustomerID, CustomerName, CustomerSegment, City
FROM Customer
WHERE CustomerID = 130;
You should find one row: CustomerID 130, Jones, Richardson and Beard, segment Design Trade. This row describes the customer rather than an order or invoice.
2. Look at a Small Group
Now widen the question: which customers belong to the same segment? Sorting makes the result easier to inspect without changing the source records.
- Excel
- SQL
- Clear the
CustomerIDfilter. - Filter
CustomerSegmentto Design Trade. - Sort
CustomerNameA to Z. Review the first five names and compareCustomerIDvalues when names match. - Keep this distinction in your notes: the filter selects a population, while the first five rows provide only a preview.
ORDER BY controls the displayed order. LIMIT 5 keeps this first result small without changing the number of design-trade customers in the source.
SELECT CustomerID, CustomerName, CustomerSegment
FROM Customer
WHERE CustomerSegment = 'Design Trade'
ORDER BY CustomerName, CustomerID
LIMIT 5;
The first five names should be Alvarez-Smith (45), Atkins, Garrett and Smith (102), Brown LLC (5), Buck Group (210), and Campbell, Martinez and Lucero (191). Keep CustomerID beside the name: it is the field you will use to follow records later.
Keep Your Evidence
Save the selected customer's identifier, name, and segment, plus one sentence describing the row. Add the first five sorted design-trade customers as a preview. Record the source file, selected keys, filters, and what one result row represents. Keep your workbook or saved SQL with your explanation.
The customer master describes the customer. It does not establish how much that customer bought, paid, or owed at a past date. Those questions need dated transaction records.
Try One Change
Find CustomerID 131 instead. Which part of your procedure changes, and which columns retain the same meaning?
Compare your reasoning
Change the identifier filter from 130 to 131. You still read one customer record. A different name or segment changes the description, not the meaning of CustomerID or the row's grain.
Next Steps
The sales coordinator can now distinguish the customer from the transaction. Next, inspect an order. Continue to Read an Order.