Hello all,
I have a column of numbers in a table, and I was wondering if it is possible
to create a histogram out of it fast and efficiently?
For example, assuming the data in the column is: 1, 5, 10, 12, 12, 15, 20,
20, 20.. I would like to return:
'less than 10' --> 2
'less than 20 and
create table numbers (val integer);
insert into numbers values (1);
insert into numbers values (5);
sqlite> select * from numbers order by val;
1
5
10
12
12
15
20
20
20
select case when val < 10 then 1 when val >=10 and val < 20 then 2
else 3 end as bin,
count(1) as c
See below.
On Sun, Dec 28, 2008 at 11:56 PM, Chris Wedgwood wrote:
> On Sun, Dec 28, 2008 at 11:49:34PM -0800, Webb Sprague wrote:
>
>> I am sure there is a better way to deal with 12K rows by 2500 columns,
>> but I can't figure it out
>
> 2500 columns sounds like a nightmare
OK here's the problem:-
I decided I needed a little app to manage some data in 3rd party binary
files, specifically, I needed to store the user generated data from the
files in a database so that I could retrieve the data in a massaged
form. As others have also decided that they need to do
On Wed, Dec 31, 2008 at 11:36 AM, John Hawley
wrote:
> the following block of code executes 2 or 3 orders of magnitude slower
> than 1 think it should ( the db was opened in earlier code)
>
Yup, you're committing each insert to disk (a VERY slow process) rather than
Regarding:
>> I am sure there is a better way to deal with 12K rows by 2500
>> columns, but I can't figure it out
I wonder if you might want to use *sed* or *awk* or *perl* to preprocess
the data before import.
A "master" table could contain the unique person id, plus the fields
that you
Hi all,
I want to set up a history of changes in a database schema. I hoped I
could simply set up triggers for changes to the SQLite_Master table,
like this:
create table "BF SQLite_Master History" -- record changes to
SQLite_Master
(
ID integer primary key
, Date date
Thanks Russell :)
It works great.
J
On Wed, Dec 31, 2008 at 5:52 AM, Russell Leighton wrote:
>
> create table numbers (val integer);
>
> insert into numbers values (1);
> insert into numbers values (5);
>
>
> sqlite> select * from numbers order by val;
> 1
> 5
8 matches
Mail list logo