Created
June 21, 2011 22:30
-
-
Save Fitzsimmons/1039093 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT lot_code | |
FROM current_inventory_levels as ia | |
WHERE ia.site_id = 48 AND ia.sku_id = 'null' AND ia.lot_code ILIKE '%%' AND ia.status = 1 | |
AND ia.location_id = '19080' | |
GROUP BY ia.sku_id, ia.lot_code, ia.expiry_date | |
HAVING sum(ia.each_quantity) > 0 | |
ORDER BY lot_code asc | |
LIMIT 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment