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 Måndag, 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 Lördag, CAST(SUM(DATE_FORMAT(ipb_timestamp,'%w')=0) AS INTEGER) AS Söndag, COUNT(*) AS Totalt FROM ipblocks WHERE ipb_timestamp >= "201701231900" GROUP BY Timme ORDER BY Timme;
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...