we have three table like follwing
</ weather=> id shop_id temp_c datetime shops=> id gstIncludedSales GST_Inc_Sales, gstFreeSales transacion=> id transaction total time transaction_date shopid
/ i have apply this query ...
select HOUR(transaction.time) as Hour ,TRUNCATE(sum(transaction.total),2) as Total_Sales,shops.gstIncludedSales as GST_Inc_Sales,shops.gstFreeSales as GST_Free from transaction,shops where transaction.shopid=shops.id and transaction.shopid=7 and transaction.transaction_date ='2015-05-25' group by hour ORDER BY hour DESC
/ i want to add one table also weather table with upper query with following result set ..
SELECT temp_c FROM weather WHERE date(datetime)='2015-05-25' and shop_id=7
this result set i want .....=>
TotalSales | GSTIncSales | GSTFree | Temp 445454 | 4545 | 545 | 4
The problem is that temp not come from weather table...