Skip to content

Instantly share code, notes, and snippets.

@feketegy
Forked from Swader/wtf.sql
Created February 2, 2016 21:24
Show Gist options
  • Save feketegy/f82837c8296328baedad to your computer and use it in GitHub Desktop.
Save feketegy/f82837c8296328baedad to your computer and use it in GitHub Desktop.
How would you rewrite this query to be MySQL 5.7 friendly? Currently fails due to new GROUP BY rules.
select extf.* from (
select ExternalTransactinId
from ebay_order_items
ExternalTransactionId is not null
group by ExternalTransactionID
) extf
extf.z_shipmentno is null
and extf.orderstatus = 'Completed'
and extf.timestamp > '2015-02-25'
order by extf.timestamp desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment