All pastes #622580 Raw Edit

Stuff

public text v1 · immutable
·published 2007-07-16 23:19 UTC
rendered paste body
select device.id, count(distinct host_links.host_link_id) as cnt from
 device
 inner join host_links on device.id=host_links.device_id
 group by device.id;