[sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-18 Thread Csanyi Pal
Hello, can one edit a multiline SQL statement in the sqlite3 CLI? Say I entered the following multiline SQL statement: sqlite> SELECT 1 UNION ALL ...> SELECT 2 UNION ALL ...> SELECT 3 ...> ; Then after a while I want to run it again, then how can I use the bash history to get back

Re: [sqlite] AVG Function HowTo

2019-12-28 Thread Csanyi Pal
2019. 12. 28. 13:07 keltezéssel, Csanyi Pal írta: Hi, I have attached here the exported sql file of my little sqlite database. I am a newbe in the sqlite language so I ask here only an advice in which direction to go, eg. which functions of sqlite language to use to achieve my goal? My

[sqlite] AVG Function HowTo

2019-12-28 Thread Csanyi Pal
Hi, I have attached here the exported sql file of my little sqlite database. I am a newbe in the sqlite language so I ask here only an advice in which direction to go, eg. which functions of sqlite language to use to achieve my goal? My issue is the following. So far my database has two

[sqlite] Can one uses the avg(X) function to calculate a few results of View's?

2019-12-22 Thread Csanyi Pal
Hi, I have a small sqlite database in which I enter my expenses and incomes,for a couple of months now. So I want to do some calculations during this period of time, like how many spend I between two dates in a month, or in a two consecutive months. I can easily create a View to see my

[sqlite] How to use CASE statement to SUM() some numbers

2019-11-15 Thread Csanyi Pal
Hi, I have a simple database, the 'Incomes_Expenses.db' on my system. It's SQL is here: -- -- File generated with SQLiteStudio v3.2.1 on P nov. 15 20:39:18 2019 -- -- Text encoding used: UTF-8 -- PRAGMA foreign_keys = off; BEGIN TRANSACTION; -- Table: Expenses CREATE TABLE Expenses (Id