E
E
eldar_web2018-09-18 12:09:34
SQL
eldar_web, 2018-09-18 12:09:34

How in SQL can I display the cheap goods of a supplier among other suppliers?

I haven't been able to submit a request for a day now.
Let's say there is a table PriceItem (goods) with fields:
price_id (supplier id)
cost (price)
brand (product brand)
How, having a supplier id, you can display cheap goods of this supplier among all suppliers, while the goods must be grouped by brand and pass the search, and when displaying, we need the following data:
price_id (of the current supplier) | cost (product price) | price_id (supplier whose product is next in the list of cheap). In general, these three fields.
Is it possible to implement this with one request, or at least two or three?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nastya Sukharik, 2018-09-18
@nastya_cyxarik

group by didn't help?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question