in reply to Re^2: correlated subqueries in DBIx::Class
in thread correlated subqueries in DBIx::Class

Sorry my error; the "+as" of "device_count" is not for the SQL but the resultant row in PERL. So device_count is a column name in each row.
  • Comment on Re^3: correlated subqueries in DBIx::Class