Stuck in building MySQL query

后端 未结 3 380
后悔当初
后悔当初 2021-01-29 12:54

Given an example of table:

id | item_id | user_id | bid_price
----------------------------------

The task is to select rows wi

3条回答
  •  北海茫月
    2021-01-29 12:59

    Use this query:

    SELECT id, item_id, user_id, min(bid_price) as bid_price 
    FROM YOUR_TABLE_NAME 
    GROUP BY item_id;
    

提交回复
热议问题