From the course: Learning Data Analytics Part 2: Extending and Applying Core Knowledge
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Solution: Total number orders by customer
From the course: Learning Data Analytics Part 2: Extending and Applying Core Knowledge
Solution: Total number orders by customer
(bouncy music) - I'm going to start by creating the query for my customers and my orders. I'll go to create, I'll choose query design. I'll bring in customer and orders. Okay, I'll go ahead and relate the customer to the CustomerID here. I'll bring in my CustomerName, and I'll bring in my OrderID. Okay, let's run this query. Okay, perfect. All right, now what I want to do is go to my design view. Now, part of the challenge is to show all the customers regardless of order, so I'll go adjust my join properties to include all records from customers. And let me go run that again. Trying to get a couple here or three. All right, let me get back up to my first record. Okay, so now that I have that base data set good to go, I'll go to my totals. I'll group by CustomerID, group by CustomerName. But I actually want to do a count of the OrderID. And then I can run the query. Perfect. Let me go to my last. Awesome, and I have zeros. Okay, so now I always want it to show the highest customer…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Understanding queries3m 22s
-
(Locked)
Building basic select queries5m 9s
-
(Locked)
Building distinct queries3m 5s
-
(Locked)
Building queries with Joins6m 39s
-
(Locked)
Building append queries8m 56s
-
(Locked)
Building total queries7m 26s
-
(Locked)
Challenge: Total number of orders by customer37s
-
(Locked)
Solution: Total number orders by customer2m 7s
-
-
-
-
-
-
-