Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2019
591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. SELECT
  2. CAST(weather.date AS date) as date,
  3. weather.temp AS temp,
  4. weather.rain AS rain,
  5. products.name AS name
  6. FROM
  7. weather
  8. LEFT JOIN transactions ON CAST(transactions.date AS date) = CAST(weather.date AS date)
  9. LEFT JOIN products ON transactions.id_product = products.id_product
  10. ORDER BY
  11. weather.date DESC
  12. LIMIT
  13. 30;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement