By nicknewbie on
My question is this. I would like to change the SQL query provided by a view. I have had a look around and see there are some ways to do this but wanted to ask if there was a simpler way before dipping in that deep to pre-process and code.
The query is very simple:
SELECT DISTINCT(node.nid) AS nid,
term_data.name AS term_data_name,
term_data.vid AS term_data_vid,
term_data.tid AS term_data_tid,
node.title AS node_title
All I want to do is apply the 'DISTINCT' to the term rather than nid. Is there a simple way of doing this?
If I change the view type to term then I do not have all the fields available to me that I require.