Quantcast
Channel: Recent posts across whole site
Viewing all articles
Browse latest Browse all 49197

how can i add group by

$
0
0

HI,
I am new to drupal.I have an issue with views.
How can i add group by clause to views.
when i used "function add_groupby" ,it is adding group by by grouping all fields in the query.

SELECT state_downtimes.down_id AS down_id, state_downtimes.reason AS state_downtimes_reason, state_downtimes.startdate_planned AS state_downtimes_startdate_planned, group_concat(title separator ' ,') AS title
FROM state_downtimes state_downtimes

LEFT JOIN service_downtimes service_downtimes ON state_downtimes.down_id = service_downtimes.downtime_id

LEFT JOIN node node ON service_downtimes.service_id = node.nid

GROUP BY down_id, state_downtimes_reason, state_downtimes_startdate_planned, title;

I need the query should be group by only with down_Id


Viewing all articles
Browse latest Browse all 49197

Trending Articles