Questions tagged [distinct]

The tag has no usage guidance.

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

Unique Products in Product Collection Filtered with Category Array in Magento 1.9

I have tried below 3 method but it is not giving correct products as per cateory id array. First Way $_productCollection = Mage::getResourceModel('catalog/product_collection') ->...
1
vote
1answer
53 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
632 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 ...
0
votes
1answer
382 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 --------------------------- ...