Discussion Locked

Select each customer's last order

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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:
http://nl.com.com/MiniFormHandler?brand=builder&subs_channel=bldr_front_door&list_id=e046&tag=fb

2 replies

by john_haefeli

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.

by junk

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.

This discussion is closed to new replies.