Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Larske
.
Toggle Highlighting
SQL
USE svwiki_p; SELECT SUBSTR(ipb_timestamp,9,2) AS timme, CAST(SUM(DATE_FORMAT(ipb_timestamp,'%w')=1) AS INTEGER) AS mandag, CAST(SUM(DATE_FORMAT(ipb_timestamp,'%w')=2) AS INTEGER) AS tisdag, CAST(SUM(DATE_FORMAT(ipb_timestamp,'%w')=3) AS INTEGER) AS onsdag, CAST(SUM(DATE_FORMAT(ipb_timestamp,'%w')=4) AS INTEGER) AS torsdag, CAST(SUM(DATE_FORMAT(ipb_timestamp,'%w')=5) AS INTEGER) AS fredag, CAST(SUM(DATE_FORMAT(ipb_timestamp,'%w')=6) AS INTEGER) AS lordag, CAST(SUM(DATE_FORMAT(ipb_timestamp,'%w')=0) AS INTEGER) AS sondag, COUNT(*) AS Totalt FROM ipblocks #WHERE ipb_user != 0 WHERE ipb_timestamp >= "20170120" GROUP BY timme #COMPUTE SUM(mandag), SUM(tisdag), SUM(onsdag), SUM(torsdag), SUM(fredag), SUM(lordag), SUM(sondag); #ORDER BY timme LIMIT 300
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...