General discussion


Select each customer's last order

By MaryWeilage Editor ·
This week's SQL Server e-newsletter explains how to select the last order for each customer.

Do you have any lingering questions about the methods described and/or employed in this e-newsletter? Is this tip useful to you? Please let us know.

If you aren't subscribed to the free SQL Server e-newsletter, click the following link to automatically sign up:

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Good Design, First.

by john_haefeli In reply to Select each customer's la ...

The basic examples are typical with what a DBA has to face...

But the query shows a basic lack of good database design, which is also typical of the industry. For example, these ER queries are not scalable to large volumes, nor to other entities besides orders and customers.

A dimensional table OLAP design is superior, provides readable queries, is more extensible, and provides better performance.

I recommend readers to concentrate on good database design, anticipating the kinds of questions that, in prioritized order, would be conceivably asked of your database.

And, if you're in a corporate environment in an implementation role, review issues with the data architect and business analyst before designs are written in stone.

Collapse -

where is the article?

by junk In reply to Select each customer's la ...

I?ve subscribed to the newsletter, but after you sent the mentioned article. I?m very interested in reading it, but can?t find it anywhere on the site.

Related Discussions

Related Forums