mysql - Laravel Group By Date -
I am trying to create a supernatural query for the following SQL,
sum In the form of 'w_created_at' as `` sales_flat_orders` in the form of `` w` group `` ````` `` ``` `` `` `` `` `` `` `` `` `` `` `` `` ` ` And I have tried to do this
$ orderbydate = DB :: table ('sales_flat_orders w') - & gt; Select (Array (DB :: Raw (as' sum (w.total_item_count)), dB :: Raw ('DATE (w.created_at created)')) - & gt; GroupB ('w.created_at') - & gt; Order By ('w.created_at') - & gt; ();
I am getting the correct output in the SQL query but not in the optical query, please help, thank you.
So friends, I got the answer, thanks for reading my question.
The raw query in my query was incorrect for the created_at field, now it is good, hopefully you will also get some input from it.
Comments
Post a Comment