title: how to check whether all the values of a database field are same using django queries
body: <p>I have a model like below</p>
  
  <pre><code>Class Product(models.Model):
      name = models.CharField(max_length=255)
      price = models.IntegerField()
  </code></pre>
  
  <p>So suppose we have <code>4 product</code> records in database, is there anyway to check whether all the 4 product records have the <code>same price</code> ?</p>
  
  <p>I don't want to loop through all the products, because there may be <code>thousands</code> of product records in database, and doing so will become a performance issue.</p>
  
  <p>So i am looking for something like using builtin django database ORM to do this</p>
  
  <pre><code>check_whether_all_the_product_records_has_same_price_value = some django ORM operation......
  
  if check_whether_all_the_product_records_has_same_price_value:
      # If all the Product table records(four) has the same price value 
      # return the starting record
     return check_whether_product_has_same_price_value(0)
  </code></pre>
  
  <p>So can anyone please let me know how can we do this ?</p>