PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Untitled
2 sec ago
Untitled
7 sec ago
Untitled
9 sec ago
clock viado
10 sec ago
Untitled
20 sec ago
Untitled
12 sec ago
Untitled
13 sec ago
Untitled
18 sec ago
Untitled
By: a guest on
Jun 1st, 2012
| syntax:
None
| size: 0.26 KB | hits: 14 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
Getting week started date using MySQL
SELECT
SUM(`city`),
SUM(`officers`),
SUM(`uk`),
SUM(`wednesday`),
DATE_FORMAT(`dateTime`, '%d/%m/%Y')
FROM myTable
WHERE dateTime BETWEEN '2011-09-28 18:00:00' AND '2011-10-29 18:59:00'
GROUP BY WEEK(dateTime)
create a
new version
of this paste
RAW Paste Data
Getting week started date using MySQL SELECT SUM(`city`), SUM(`officers`), SUM(`uk`), SUM(`wednesday`), DATE_FORMAT(`dateTime`, '%d/%m/%Y') FROM myTable WHERE dateTime BETWEEN '2011-09-28 18:00:00' AND '2011-10-29 18:59:00' GROUP BY WEEK(dateTime)