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.

datebydate = DB :: table ('sales_flat_orders w' db :: raw ('DATE (w.created_at)')))))) - & gt; GroupB (Select 'Day' (ARE (DB :: Raw 'Deckount' as 'zodiac (w.total_item_count)') -> Order By ('w.created_at') -> Received ( );

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.

< / Html>

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -