Advertisement
Dodma

Untitled

May 23rd, 2020
696
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. SELECT
  2. CAST(weather.date AS date) AS date,
  3. weather.temp AS temp,
  4. COUNT(DISTINCT transactions.id_transaction) AS uniq_transactions
  5. FROM
  6. weather
  7. LEFT JOIN transactions ON transactions.date = weather.date
  8. GROUP BY
  9. weather.date,
  10. weather.temp
  11. ORDER BY
  12. date ASC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement