I'm having issues writing a SQL query to return a record when I have a dataset similar to the following:
| id | price |
|---|---|
| 32967 | 39 |
| 14675 | 40 |
| 26434 | 41 |
| 18495 | 42 |
| 19698 | 43 |
| 19090 | 44 |
| 9278 | 45 |
| 14932 | 46 |
I would like to return the id and price when the price is greater than previous price and the id is lower than previously low priced records. So with the above data I would like to return:
| id | price |
|---|---|
| 32967 | 39 |
| 14675 | 40 |
| 9278 | 45 |
I truly appreciate the help. I'm to the point where my brain has shut off and I'm certain I'm missing something obvious. Know when to ask for help, right?