column dt format a10
column dy format a7
column total format 999
column h0 format 99
column h1 format 99
column h2 format 99
column h3 format 99
column h4 format 99
column h5 format 99
column h6 format 99
column h7 format 99
column h8 format 99
column h9 format 99
column h10 format 99
column h11 format 99
column h12 format 99
column h13 format 99
column h14 format 99
column h15 format 99
column h16 format 99
column h17 format 99
column h18 format 99
column h19 format 99
column h20 format 99
column h21 format 99
column h22 format 99
column h23 format 99
select to_char(first_time,'yyyy-mm-dd') dt,
to_char(first_time, 'dy') dy,
count(1) "total",
sum(decode(to_char(first_time, 'hh24'),'00',1,0)) "h0",
sum(decode(to_char(first_time, 'hh24'),'01',1,0)) "h1",
sum(decode(to_char(first_time, 'hh24'),'02',1,0)) "h2",
sum(decode(to_char(first_time, 'hh24'),'03',1,0)) "h3",
sum(decode(to_char(first_time, 'hh24'),'04',1,0)) "h4",
sum(decode(to_char(first_time, 'hh24'),'05',1,0)) "h5",
sum(decode(to_char(first_time, 'hh24'),'06',1,0)) "h6",
sum(decode(to_char(first_time, 'hh24'),'07',1,0)) "h7",
sum(decode(to_char(first_time, 'hh24'),'08',1,0)) "h8",
sum(decode(to_char(first_time, 'hh24'),'09',1,0)) "h9",
sum(decode(to_char(first_time, 'hh24'),'10',1,0)) "h10",
sum(decode(to_char(first_time, 'hh24'),'11',1,0)) "h11",
sum(decode(to_char(first_time, 'hh24'),'12',1,0)) "h12",
sum(decode(to_char(first_time, 'hh24'),'13',1,0)) "h13",
sum(decode(to_char(first_time, 'hh24'),'14',1,0)) "h14",
sum(decode(to_char(first_time, 'hh24'),'15',1,0)) "h15",
sum(decode(to_char(first_time, 'hh24'),'16',1,0)) "h16",
sum(decode(to_char(first_time, 'hh24'),'17',1,0)) "h17",
sum(decode(to_char(first_time, 'hh24'),'18',1,0)) "h18",
sum(decode(to_char(first_time, 'hh24'),'19',1,0)) "h19",
sum(decode(to_char(first_time, 'hh24'),'20',1,0)) "h20",
sum(decode(to_char(first_time, 'hh24'),'21',1,0)) "h21",
sum(decode(to_char(first_time, 'hh24'),'22',1,0)) "h22",
sum(decode(to_char(first_time, 'hh24'),'23',1,0)) "h23"
from v$log_history
group
by to_char(first_time,'yyyy-mm-dd') ,
to_char(first_time, 'dy')
order
by 1;
mysql 查詢24小時內 資料,null用0代替
獲取24小時資料總數,但是當某乙個小時內沒有產生資料時,group by就篩選不出來那個時間段的資料,但實際需求是要用0代替。解決方法如下 select dayhour,if count is null,0,count from select count as count,date format c...
如何在24小時內快速獲取GOOGLE長尾排名
對於,除非你的權重很高,當天收錄的,可能長尾24小時內會有排名,但是反覆無常我們很難去把握,筆者今天分享下如何在24小時內獲取google長尾排名。當然你得選那些競爭度不是很大的長尾,這一招筆者經常應用於企業站長尾關鍵詞的優化。對於長尾關鍵詞,在google中快速獲取排名的操作方法 1,製作關鍵詞頁...
分享新站搭建推廣經驗 百度24小時內收錄
乙個新的 在上線前後都需要準備很多,網域名稱的選擇,的程式伺服器選擇 的性質定位和 的如何盈利這些都要在前面考慮好,都是環環相扣的,如果在網域名稱註冊錢不把這些構思好,那 最後會面臨更多的問題,嚴重的會直到關閉。一 網域名稱註冊,我選擇的是.com的網域名稱,而且是四位的,方便使用者記住,網域名稱還...