title: How to filter only by a single column?
body: <p>I have a sql which gives the following result. </p>
  
  <p>!(<a href="https://imgur.com/a/cQjceR2" rel="nofollow noreferrer">https://imgur.com/a/cQjceR2</a>)</p>
  
  <p>I want to filter the results by the first column "eventid", where only the first three results of the particular month will be shown. </p>
  
  <p>For example, in the image there are four eventids for month 12, in the new result there will be only three. </p>
  
  <p>The following is the sql. </p>
  
  <pre><code>select eventid, qtysold, pricepaid, qtysold*pricepaid as total_sales_by_tickets,
  "date_part"('month'::text, saletime) AS month_id 
  from public.sales
  group by eventid, qtysold, pricepaid, total_sales_by_tickets, month_id
  ORDER BY qtysold desc, "date_part"('month'::text, saletime desc; 
  </code></pre>