Questions tagged [distinct]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
182 views

How Do I add the distinct statement to my query?

This is my code: $statusTable = $dbHelper->getTableName("mp_os_statuses"); $this ->getSelect() ->joinInner(array('status'=>$statusTable), "status.value = ...
1
vote
2answers
2k views

Display sum of Amount corresponding to some column xyz

I had created model donation to save donation information and now i want to display total amount of donation to be shown with all the other field my table is as follows --------------------------- ...
1
vote
1answer
51 views

Distinct value not show in the below query

I want to display value based on distinct month but it will not show the distinct month it show the repeat month. "select DISTINCT {fn MONTHNAME(entrydate)} AS monthname, emirate_name, location, ...
8
votes
2answers
531 views

What is the Magento ORM equivalent of “SELECT DISTINCT attribute FROM products”?

I need to retrieve a list of all values which are used for a specific product attribute, in (pseudo) SQL: SELECT DISTINCT attribute FROM products; How would I use the Magento ORM to generate an ...