Thanks, I was able to patch the table by removing the single tick marks using
the trim and the group by query now works as expected.
-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On
Behalf Of R Smith
Sent: Thursday, March 22, 2018 7:23 AM
To:
convert a datetime column to a date?
SQLITE3 datetime fields are actually text.
Fix the file that you're importing so it doesn't have quotes around the date.
It looks like you're using some kind of modified CSV exporter to create the
file.
On 3/22/18, 9:06 AM, "sqlite-
2018 6:49 AM
To: SQLite mailing list
Subject: Re: [sqlite] How to convert a datetime column to a date?
1. It looks like you have superfluous quotes around the dates. That's probably
your issue.
2. Try "select distinct dttm from foo LIMIT 10;"
On 3/22/18, 8:47 AM, &qu
27;_
_'2017-11-08 07:05:01'_
_'2017-11-08 07:05:01'_
_'2017-11-08 07:05:01'_
_'2017-11-08 07:06:01'_
_'2017-11-08 07:06:01'_
-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On
Behalf Of R Sm
The table defines “dttm” as a “datetime” datatype.
sqlite> select distinct dttm from foo;
… (lots of records)
'2018-03-22 06:25:01'
'2018-03-22 06:26:01'
'2018-03-22 06:27:01'
'2018-03-22 06:28:01'
'2018-03-22 06:29:01'
'2018-03-22 06:30:01'
'2018-03-22 06:31:01'
'2018-03-22 06:32:02'
ite-users-boun...@mailinglists.sqlite.org] On
Behalf Of R Smith
Sent: Thursday, March 22, 2018 4:21 AM
To: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] How to convert a datetime column to a date?
On 2018/03/21 5:30 PM, Ron Watkins wrote:
> I have a table which contains
I have a table which contains a datetime column:
table|foo|foo|2|CREATE TABLE foo (
dttmdatetimenot null
i int not null
)
I want to select out the max(i) value for each day where there are multiple
records per day.
select date(dttm) dt,max(i) from
7 matches
Mail list logo