Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4991

Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4993
Uncommon SQL 2 – MySQL Question of the Day

Skip to content

Uncommon SQL 2

20. July 2010
By plogi in general

Hi again!
Continuing the example from yesterday, the following query shows the the real power of that syntax:

MariaDB [tt]> select * from vending_price where (price,product_id) in
                      (select max(price),product_id
                       from vending_price group by product_id);

Comment Feed

No Responses (yet)

You must be logged in to post a comment.