Is it possible to make multiple queries at once within the same query?
Here is an example of what I'm trying to do.
We have the following table:
| userid | price | stock | description |
----------------------------------------
1 10.00 5 some text
2 25.00 2 some text
3 15.00 3 some text
4 35.00 2 some text
5 30.00 4 some text
The queries that I'm trying to do are:
- the MIN and MAX price group by description
- the price set by userid 2
- Stock and price of the first three results only without grouping
So the HTML table will look like this:
description | Min_Price | Max_Price | Price Set by userid 2 | 1st Price | 1st Stock | 2nd Price | 2nd Stock | 3rd Price | 3rd Stock