Questions tagged [distinct]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

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') ->...
Yogita's user avatar
  • 784
0 votes
1 answer

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 = ...
Attila Naghi's user avatar
  • 3,903
1 vote
2 answers

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 --------------------------- ...
Paras Arora's user avatar
1 vote
1 answer

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, ...
Akhilesh Soni's user avatar
8 votes
2 answers

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 ...
STW's user avatar
  • 2,047