J
Jaek
Hello and thanks in advance -
I have a table with a list of books (identified by ISBN) and their prices
week-to-week, call it 'PRICES'.
PRICES has 4 fields: ISBN, Price, Year, WeekNumber.
Prices dont' change that often, so for a given book, the same price will
appear week after week for months at a time, but every now and then the
publisher ups the price by a dollar or two. My mission: I need to identify
the week when the price changes for a given book (put another way I need the
earliest week each unique price appears for a given book).
It's pretty easy to get a list of ISBNs and their unique prices in a given
period by only including the ISBN and Price and using a DISTINCT query (or
grouping in an aggregate query). I've then tried tying this back with a
correlated subquery to get the least value for the year and date columns
where a given ISBN and Price appear. But my query writing must be especially
cruddy because executing the SQL has consistently crashed the app!
I know one of y'all has the simple answer to this... Thanks.
I have a table with a list of books (identified by ISBN) and their prices
week-to-week, call it 'PRICES'.
PRICES has 4 fields: ISBN, Price, Year, WeekNumber.
Prices dont' change that often, so for a given book, the same price will
appear week after week for months at a time, but every now and then the
publisher ups the price by a dollar or two. My mission: I need to identify
the week when the price changes for a given book (put another way I need the
earliest week each unique price appears for a given book).
It's pretty easy to get a list of ISBNs and their unique prices in a given
period by only including the ISBN and Price and using a DISTINCT query (or
grouping in an aggregate query). I've then tried tying this back with a
correlated subquery to get the least value for the year and date columns
where a given ISBN and Price appear. But my query writing must be especially
cruddy because executing the SQL has consistently crashed the app!
I know one of y'all has the simple answer to this... Thanks.