mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-08 05:14:00 +02:00
8 lines
306 B
Text
8 lines
306 B
Text
Accounts with multiple barcodes:
|
|
|
|
SELECT accounts.name,barcodes.account,barcodes.barcode
|
|
FROM "barcodes"
|
|
join accounts on accounts.id = barcodes.account
|
|
where barcodes.account in (select a from (select count(*) as c, account as a from barcodes group by account) as dt where c > 1)
|
|
ORDER BY "account" DESC
|
|
|