title: How to reduce result rows of SQL query equally in full range?
body: <p>I have values related to dates. I need to select data for example for 10 years. Standard query result has approximately 3000 rows, but I need to show them on graph with 400px width and send them over the rest api to mobile phone. So it would be nice to reduce the data to let's say 400 values.</p>
  
  <p>Is there any build in method how to reduce data equally in full range in SQL Server or PostgreSQL? How should I do this?</p>