{"id":96,"date":"2009-03-19T12:48:10","date_gmt":"2009-03-19T17:48:10","guid":{"rendered":"http:\/\/peshvar.com\/myblog\/?p=96"},"modified":"2009-03-19T12:48:10","modified_gmt":"2009-03-19T17:48:10","slug":"sql-breakdown-time","status":"publish","type":"post","link":"https:\/\/peshvar.com\/myblog\/2009\/03\/19\/sql-breakdown-time\/","title":{"rendered":"SQL breakdown TIME"},"content":{"rendered":"<p>This statement will count number of records in a given month and breakdown it every 30 minutes.<\/p>\n<p>select count(ID) as ID_Count, Date_30min from<br \/>\n(  select ID, convert(datetime,convert(varchar(14),calldatetimefield,120) + case when datepart(minute,calldatetimefield) < 30 then '00' else '30' end)  as date_30min\n    from tablename where calldatetimefield between '2009-02-01 00:00:00.000' and '2009-02-28 23:59:59.997' and ......)  d30\ngroup by date_30min\norder by date_30min DESC\n\n\n[ad#co-1]\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This statement will count number of records in a given month and breakdown it every 30 minutes. select count(ID) as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[32],"tags":[36,38,37],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-all-about-sql-2000-and-2005","tag-sql-breakdown","tag-sql-date","tag-time"],"_links":{"self":[{"href":"https:\/\/peshvar.com\/myblog\/wp-json\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peshvar.com\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peshvar.com\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peshvar.com\/myblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peshvar.com\/myblog\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":2,"href":"https:\/\/peshvar.com\/myblog\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":98,"href":"https:\/\/peshvar.com\/myblog\/wp-json\/wp\/v2\/posts\/96\/revisions\/98"}],"wp:attachment":[{"href":"https:\/\/peshvar.com\/myblog\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peshvar.com\/myblog\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peshvar.com\/myblog\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}