[Dbix-class] How to realize query with GROUP BY, LEFT JOIN, AND COUNT?

dreel dreel at bk.ru
Thu Aug 9 13:20:27 GMT 2007


I need to realize this query in DBIx - but it's no things in newbie head how to do it...

SELECT net_name, COUNT(node_id) as dev_count
FROM [dbo].[networks] nw
LEFT JOIN nodes nd ON nw.net_id = nd.net_id
GROUP BY net_name

result:
net_name   dev_count
--------   ----------
net1        7


----
dr.eel



More information about the DBIx-Class mailing list