select col1, aggregateFunction(col2) from table group by col3 order by col1
returns the result of the aggregate function applied to all "col2" values in
the "col3" group. The col1 value is the last visited row in the group which
triggered the aggregate, with a special case for MIN and MAX,
On 2016-05-09 7:54 PM, Rowan Worth wrote:
> On 10 May 2016 at 08:31, Darren Duncan wrote:
>
>> The Ceiling function is not that simple, unless you know that your rank
>> and outOf are always non-negative numbers. If they might be negative, you
>> would -1 rather than +1 when the result is
On Mon, May 9, 2016 at 7:00 PM, jungle Boogie
wrote:
> On 8 May 2016 at 23:13, Stephan Beal wrote:
> > On Mon, May 9, 2016 at 5:40 AM, Stephan Beal
> wrote:
> >
> >> That suggests that the script is not consistently telling sqlite which
> TZ
> >> to use in all calculations. i will take a look
At this point, backward compatibility. Enough people use it expecting it to
work that it would be bad to change the behavior.
On Mon, May 9, 2016 at 6:42 PM, dandl wrote:
> > bounces at mailinglists.sqlite.org] On Behalf Of Keith Medcalf
>
> > Why are you using BOTH distinct and group by on the
Hick Gunter gave the documented explanation above.
On Mon, May 9, 2016 at 6:18 PM, dandl wrote:
> The interesting thing about this query is that you can drop any of
> DISTINCT,
> GROUP BY or ORDER BY and get the same result.
>
> But my question was not "how can I rewrite my query?". It was: how
On 2016-05-09 4:24 AM, Cecil Westerhof wrote:
> I need to have a CEIL function in SQLite. This is the way I implemented it:
> WITH percentage AS (
> SELECT date
> , 100.0 * rank / outOf AS percentage
> , CAST(100.0 * rank / outOf AS int) AS castedPercentage
>
2016-05-09 16:18 GMT+02:00 Dominique Devienne :
> On Mon, May 9, 2016 at 3:48 PM, Dominique Devienne
> wrote:
> > On Mon, May 9, 2016 at 3:46 PM, Dominique Devienne
> wrote:
> >> On Mon, May 9, 2016 at 3:21 PM, Cecil Westerhof
> wrote:
> >>> [...] Is there a way to get this information?
> >>
>
On Mon, May 9, 2016 at 3:48 PM, Dominique Devienne
wrote:
> On Mon, May 9, 2016 at 3:46 PM, Dominique Devienne
> wrote:
>> On Mon, May 9, 2016 at 3:21 PM, Cecil Westerhof
>> wrote:
>>> [...] Is there a way to get this information?
>>
>> Just name your CHECK constraint, and use a recent
E.Pasma wrote:
> 09-05-2016, OBones:
>> Isn't Ceil(Value) simply Round(Value + 0.5) ?
> But Round(0.5) = 1
> May be Round(Value+0.4) is good enough?
Well, yes, there's an issue at 0, but for anything else positive, it
should be good enough.
09-05-2016, OBones:
> Isn't Ceil(Value) simply Round(Value + 0.5) ?
But Round(0.5) = 1
May be Round(Value+0.4) is good enough?
On Mon, May 9, 2016 at 3:46 PM, Dominique Devienne
wrote:
> On Mon, May 9, 2016 at 3:21 PM, Cecil Westerhof
> wrote:
>> I made a table with a few CHECK constraints. When an INSERT is not
>> possible, I would like to know which CHECK constraint fired. Is there a way
>> to get this information?
On Mon, May 9, 2016 at 3:21 PM, Cecil Westerhof
wrote:
> I made a table with a few CHECK constraints. When an INSERT is not
> possible, I would like to know which CHECK constraint fired. Is there a way
> to get this information?
Just names your CHECK constraint, and use a recent version of
I made a table with a few CHECK constraints. When an INSERT is not
possible, I would like to know which CHECK constraint fired. Is there a way
to get this information?
--
Cecil Westerhof
On Mon, May 9, 2016 at 2:20 PM, Richard Hipp wrote:
> On 5/9/16, Chris Brody wrote:
>> On Wed, May 4, 2016 at 2:52 PM, Richard Hipp wrote:
>>> On 5/4/16, Bhagwat Balshetwar wrote:
I want to write the custom function for regular expression using C/C++.
>>>
>>> You mean like this one:
>>>
2016-05-09 13:57 GMT+02:00 Michele Pradella :
>
> 2016-05-09 13:40 GMT+02:00 Michele Pradella :
>>
>> I need to have a CEIL function in SQLite. This is the way I implemented
>>> it:
>>>
WITH percentage AS (
SELECT date
, 100.0 * rank / outOf AS
On Mon, May 9, 2016 at 1:52 PM, Cecil Westerhof
wrote:
> ?But I want it to be possible for ?everyone? to use the application. People
> need to implement my function then. Or am I wrong about that?
>
fyi, ceil(3) is c99, not c89, which is likely the (or a) reason it's not
included in sqlite by
On Wed, May 4, 2016 at 2:52 PM, Richard Hipp wrote:
> On 5/4/16, Bhagwat Balshetwar wrote:
>> I want to write the custom function for regular expression using C/C++.
>
> You mean like this one: https://www.sqlite.org/src/artifact/a68d25c659bd2d89
Is there any reason this cannot be included as
> 2016-05-09 13:40 GMT+02:00 Michele Pradella :
>
>> I need to have a CEIL function in SQLite. This is the way I implemented it:
>>> WITH percentage AS (
>>> SELECT date
>>> , 100.0 * rank / outOf AS percentage
>>> , CAST(100.0 * rank / outOf AS int) AS
2016-05-09 13:40 GMT+02:00 Michele Pradella :
> I need to have a CEIL function in SQLite. This is the way I implemented it:
>> WITH percentage AS (
>> SELECT date
>> , 100.0 * rank / outOf AS percentage
>> , CAST(100.0 * rank / outOf AS int) AS
2016-05-09 13:36 GMT+02:00 OBones :
> Cecil Westerhof wrote:
>
>> I need to have a CEIL function in SQLite. This is the way I implemented
>> it:
>> WITH percentage AS (
>> SELECT date
>> , 100.0 * rank / outOf AS percentage
>> , CAST(100.0 * rank / outOf AS
> I need to have a CEIL function in SQLite. This is the way I implemented it:
> WITH percentage AS (
> SELECT date
> , 100.0 * rank / outOf AS percentage
> , CAST(100.0 * rank / outOf AS int) AS castedPercentage
> FROM ranking
> )
> SELECT date
> ,
Cecil Westerhof wrote:
> I need to have a CEIL function in SQLite. This is the way I implemented it:
> WITH percentage AS (
> SELECT date
> , 100.0 * rank / outOf AS percentage
> , CAST(100.0 * rank / outOf AS int) AS castedPercentage
> FROM ranking
> )
>
I need to have a CEIL function in SQLite. This is the way I implemented it:
WITH percentage AS (
SELECT date
, 100.0 * rank / outOf AS percentage
, CAST(100.0 * rank / outOf AS int) AS castedPercentage
FROM ranking
)
SELECT date
, (CASE WHEN percentage =
> From: Stephan Buchert [mailto:stephanb007 at gmail.com]
> Sent: Saturday, May 07, 2016 12:10 AM
> Copying the WAL files is probably more efficient than the SQL text solutions
> (considering that roughly 5 GB of binary data are weekly added), and it seems
> easy to implement, so I'll probably
Just to add to the below:
S#| SNAME | STATUS | CITY
---
S1| Smith | 20 | London
S2| Jones | 10 | Paris
S3| Blake | 30 | Paris
S4| Clark | 20 | London
S5| Adams | 30 | Athens
SELECT DISTINCT "CITY" FROM "S" GROUP BY "CITY"
I have the following query:
SELECT DISTINCT "EVALA112"("S#") AS "^" FROM "S" ORDER BY "S#" ASC ;
[This is generated code, not hand-written. The table S is from CJ Date
sample data.]
This query appears to work correctly. The function is an aggregation, and
requires the data to be sorted.
This
On 8 May 2016 at 10:14, just_rookie <925345468 at qq.com> wrote:
> Obviously, I did not do incompatible things with a database at the same
> time.
>
You are attempting to drop a table in databases 300_500.db and 600_900.db.
Obviously another process must create that table, since your test code
On 2016-05-07 01:29, Simon Slavin wrote:
> On 7 May 2016, at 3:28am, Keith Medcalf wrote:
>
>> I presume you mean that running 32-bit application on a 64-bit OS is
>> slower than the same application run on a 32-bit OS.
>
> Hold on. The original poster was talking about using a 32-bit DLL,
Re WAL mode trick.
I think you would want to complete a checkpoint and then do the backup,
ensuring that no check-points are done during your backup time. This way,
you know that your committed transactions prior to the backup are in the
file being backed up.
regards,
Adam
On Sat, May 7, 2016
On 8 May 2016 at 23:13, Stephan Beal wrote:
> On Mon, May 9, 2016 at 5:40 AM, Stephan Beal wrote:
>
>> That suggests that the script is not consistently telling sqlite which TZ
>> to use in all calculations. i will take a look at it as time
>>
>
> just fyi: i can now reproduce the problem on my
On 5/9/16, Chris Brody wrote:
> On Wed, May 4, 2016 at 2:52 PM, Richard Hipp wrote:
>> On 5/4/16, Bhagwat Balshetwar wrote:
>>> I want to write the custom function for regular expression using C/C++.
>>
>> You mean like this one:
>> https://www.sqlite.org/src/artifact/a68d25c659bd2d89
>
> Is
On Mon, May 9, 2016 at 5:40 AM, Stephan Beal wrote:
> That suggests that the script is not consistently telling sqlite which TZ
> to use in all calculations. i will take a look at it as time
>
just fyi: i can now reproduce the problem on my x64, where my days are
shifted 1 to the left. Not sure
Why are you using BOTH distinct and group by on the same column? You only need
one or the other. If you are redundantly redundant I would hope that the
optimizer makes redundant (as in gets rid of, for those that are not English)
the redundancies ...
> -Original Message-
> From:
This is documented behaviour for SQLite:
SELECT a, MAX(b) table;
Will return (one of) the a value(s) that comes from the same row as the MAX(b).
If there are not exactly on of MIN or MAX aggregate functions, SQLite is free
to pick any row (within a group) to return non-aggregated columns from.
That suggests that the script is not consistently telling sqlite which TZ
to use in all calculations. i will take a look at it as time allows.
Probably just need to be sure to consistently pass the final argument to
strftime().
- stephan
(Sent from a mobile device, possibly from bed. Please
On Sun, May 8, 2016 at 7:45 PM, dandl wrote:
> Just to add to the below:
>
> S#| SNAME | STATUS | CITY
> ---
> S1| Smith | 20 | London
> S2| Jones | 10 | Paris
> S3| Blake | 30 | Paris
> S4| Clark | 20 | London
> S5| Adams |
36 matches
Mail list logo