0

I'd like to run Postgres SQL functions within a F# Query Expression. I'd like to know if it is even possible.

My use case is that I'd like to use TimescaleDB, a time series database. I can go like this in native sql.

SELECT time_bucket('15 minutes', time) AS fifteen_min,
    location, COUNT(*),
    MAX(temperature) AS max_temp,
    MAX(humidity) AS max_hum
  FROM conditions
  WHERE time > NOW() - INTERVAL '3 hours'
  GROUP BY fifteen_min, location
  ORDER BY fifteen_min DESC, max_temp DESC;
Philip Nguyen
  • 821
  • 2
  • 9
  • 28
  • Does this answer your question? [Using built-in sql functions in a LINQ query?](https://stackoverflow.com/questions/11663523/using-built-in-sql-functions-in-a-linq-query) – citykid Jul 17 '21 at 14:13

0 Answers0