I think it's possible with CTE.
Recently I wondered whether it would be possible to implement an operation
that might be called "an accumulated group by". It's when you enumerate the
rows and based on the values of the previous row and current row you apply
some new "group" value that can be used
On Thu, 07 Dec 2017 19:46:21 +0100, nitpi...@arcor.de wrote:
> Hi all,
>
> I have a DB i.e. like this:
>
> table values
> bctemp
> 35123
> 35124
> 35123
> 20123
> 12123
> 12123
> 16123
> 35123
> 35123
> 35123
> 35123
> 35123
>
> The value in
Have your application read the table in reverse order. Then when the value of
BC changes, stop incrementing a counter and close the select. You can use
whatever ordering you like just so long as it is "descending" (that is reading
backwards). ((Code example in Python -- you can use wordier
Ok I'm on this list because I love reading all the comments and discussion
about sqlite and DBs in general. I haven't used sqlite in quite awhile, so I
don't know how well this will work, but...
Assuming you have a row number as well, such as
CREATE TABLE x
(
row_number int,
The question you're gonna get asked of course is "what are you sorting by?"
If it's for example rowid, then this convoluted thing will work, though
probably inefficiently.
create table tbl (bc int, temp int);
insert into tbl values (35, 123), (35, 124), (35, 123), (20, 123), (12, 123),
(12,
5 matches
Mail list logo