Untitled

mail@pastecode.io avatar
unknown
mysql
2 months ago
1.3 kB
8
Indexable
Never
SELECT 
    bin,
    location,
    GROUP_CONCAT(DISTINCT previouslocation) prevlocs,
    lastscandate
FROM
    inventoryitem
WHERE
    bin IN ('b28520427' , 'b28520445',
        'b28520436',
        'b28520202',
        'b28520441',
        'b28520442',
        'b28520444',
        'b28520439',
        'b28520440',
        'b28520438',
        'b28520437',
        'b28520540',
        'b28520469',
        'b28520471',
        'b28520472',
        'b28520477',
        'b28520479',
        'b28520480',
        'b28520475',
        'b28520476',
        'b28520481',
        'b28520482',
        'b28520494',
        'b28520496',
        'b28520498',
        'b28520466',
        'b28520176',
        'b28520204',
        'b28520201',
        'b28520206',
        'b28520449',
        'b28520169',
        'b28520216',
        'b28520167',
        'b28520223',
        'b28520256',
        'b28520244',
        'b28520247',
        'b28520257',
        'b28520195',
        'b28520196',
        'b28520559',
        'b28520236',
        'b28520237',
        'b28520252',
        'b28520253',
        'b28520266',
        'b28520265',
        'b28520259',
        'b28520491',
        'b28520413',
        'b28520406',
        'b28520269')
        AND qtyonhand = 1
GROUP BY bin
ORDER BY location ASC
Leave a Comment