Method I : SELECT count('id') as cnt,order_status,order_date FROM `product_order` group by MONTH(order_date) Method II : SELECT count('id') as cnt,order_status,order_date FROM `product_order` group by DATE_FORMAT(order_date, '%m') Method III: SELECT SQL_NO_CACHE YEAR(record_date), MONTH(record_date), COUNT(*) FROM stats GROUP BY YEAR(record_date)*100 + MONTH(record_date) SELECT YEAR(date_column), MONTH(date_column), COUNT(*) FROM date_table GROUP BY DATE_FORMAT(date_column, '%Y%m')
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Monday, 30 June 2014
MySQL Query GROUP BY day / month / year
Subscribe to:
Post Comments (Atom)
Feet/Inches to Meters Converter & Lbs to Kgs Converter
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...
-
<?php $to = "somebody@example.com, somebodyelse@example.com"; $subject = "HTML email"; $message = " <h...
-
ISAIMINI.COM Download
-
document.onkeydown = myKeyDownHandler; function myKeyDownHandler(event){ alert(event.keyCode) }
No comments:
Post a Comment