group by date

select 
    sum(bt.value),
    date_format(bt.createdAt,'%Y-%m-%d') as dates
from production.block_transaction bt 
where 
    bt.createdAt > NOW() -INTERVAL 7 DAY
group by  d
    ate_format(bt.createdAt,'%Y-%m-%d')
limit 10

Last updated

Was this helpful?