I have a table called Item which has an ID, a Name and a Price. Is it possible using SQL select statements to get every possible, but distinct combination of items below a specific price?
For example, assume this table:
ID Name Price
-- ---- -----
1 A 1
2 B 2
3 C 3
4 D 4
5 E 5
The query, taken the limit is for example 10, shall only return A, B, C, D
, but not A, B, D, C
additionally.
Is something like this even possible? Please excuse this probably stupid question, but I'm learning SQL for a year now, but our teacher hasn't even explained what SQL means. My entire knowledge is from books, so I'm not sure if this is a suitable question or not.