Chapter 14. Queries That Think Faster than You

In This Chapter

  • Doing more with the Total row

  • Uncovering the Total row in your query grid

  • Organizing with Group By

  • Summing your results

  • Counting everything at one time

  • Exploring the ins and outs of Where

Ever need to know how many orders were placed in the past month? Or total dollar sales for last year? How about the top ten best‐selling products for the current year? If you answered yes to any of these questions or have similar questions that need answering, then this chapter is for you. Here I discuss the ever‐wonderful Total row. The Total row slices, dices, and makes julienne fries out of your data! Well, actually, it summarizes your data via the select query. If you don't know what a select query is or how to create one, I suggest you go back and read Chapter 12 before beginning the material in this chapter.

Kissing That Calculator Goodbye via the Total Row

In Chapter 12, I show you how simple select queries can fetch data, such as a list of customers who reside in California or all the details of tofu sales. The Total row takes the select query one step further and summarizes the selected data. The Total row can answer questions like, “How many of our customers reside in California?” and “How much money did we make in tofu sales last month?” It can also do statistical calculations, such as standard deviations, variances, and maximum and minimum values. For a complete list of what the Total row can do, see Table 14-1 .

Table 14.1. 14-1: ...

Get Access® 2007 For Dummies® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.