How do I remove duplicates when using the random sort?

Solutions

You can apply GROUP BY or DISTINCT by enabling views aggregation settings to remove duplicate records.
1. Go and edit your view
2. In Advanced » OTHER section by enabling Use aggregation: Yes
3. In FIELDS or FILTER CRITERIA section, select and apply Aggregation settings for which fields you want to group by or distinct.

The simple way to achieve distinct values in a view is to make the following:

  1. Go and edit your view
  2. In Advanced » OTHER section click on "Query setting"
  3. Check "Distinct" check-box.

The simple way to achieve distinct values using Views is to do the following:

  1. Go and edit your view
  2. In Advanced » OTHER section click on "Query setting"
  3. Check "Distinct" check-box.

You can apply GROUP BY or DISTINCT by enabling views aggregation settings to remove duplicate records.

  1. Go and edit your view
  2. In Advanced » OTHER section by enabling Use aggregation: Yes
  3. In FIELDS or FILTER CRITERIA section, select and apply Aggregation settings for which fields you want to group by or distinct.
Tags: Drupal 7 / Views

Similar questions

How do I remove product duplicates in a view?
In my view I have duplicate entities for my product list, this is different from Drupal 7 as you could use the distinct module. How can I remove the duplicates from my commerce product views in Drupal 8?
How to remove duplicates (nodes with the same fields) from drupal 7 view?
For example: we have some products with diff colors. I want to get its colors. If I add to view fields the color field I will get duplicates (colors) in output. Needs realize something like GROUP BY field_color_value in sql-query.
Remove duplicates with drupal recurring dates in view
I have a content type called Event which has a field called field_event_date. The date field can have recurring dates. I'm trying to display a list of events and only show each event one time, however it is showing once for each of the recurring dates. I've found many posts about this and still can't figure it out. My view is very simple. It is sho...
How to remove random numbers and letters from Drupal css/js file
In Drupal 7 performance caching and bandwidth optimization are disabled. Whenever css/js file is loaded, there is a random(?) numbers and letters are attached like http://xxx/modules/system/system.theme.css?o9pvtm , http://xxx/sites/all/themes/test/js/handlebars.runtime.min.js?o9pvtm How can I remove those "?o9pvtm" so js/css files can be cached by...
How do I avoid duplicates when using a reference field?
I have a content type with an entity reference field. If I have more then one entity in this field, and display the field in a view, it displays duplicates. Anyone figured out how to remove these duplicates in Drupal 8?
A view with exposed sort: can i turn off 'grouping field' for different sort criteria?
My Views list of events is grouped by the date (using the Grouping Field checkbox in the Style settings). But my exposed Sort Criteria can sort the list by either date or by name. An alphabetical list of events grouped by date really doesn't make any sense. What would make sense is for the Grouping Field to turn off when the Sort Criteria is by nam...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.