Hope the title is a reasonable description. I have 2 tables in a db (sqlite). CREATE TABLE files ( name TEXT, sha256 TEXT, fsno INT ); CREATE TABLE sha256 ( sha256 TEXT, fs1 INT, fs2 …
Tag: sqlite
How to sum COUNT values
I’m very new to SQLite so please forgive me asking something stupid. From a database with a table containing aircraft data I can count the records with data from a manufacturer with my existing query: …
Is it possible to select multiple offsets with SQL
I’d like to select multiple offsets with a single SELECT SQL query. Is this possible? For example, let’s say I have a table of non-continuous dates called dates. I’d like to select the 1st, 4th and 7th offsets from the most recent date. In this example, the query should return: Ideally, I would like to write the query as follows:
Row Value Comparison Alternatives?
I’m working in a C# SQLite library (SQLite-net) that doesn’t seem to support row value comparisons like this: I get an error message at the first comma. Is there a long form way of doing the same comparison that could be compatible with older SQLite implementations? I’m no expert in SQL but I’ve tried a few ways of comparing the
SQLite – Sort and get the number in the list
sql.all(`SELECT * FROM users ORDER BY points DESC`).then() How can I sort the list and get the current number on the list? Example: LIST: USERID | POINTS 1 | 20 2 | 100 3 | 67 VAR MYID = 1 Output: …
Why do I fail to save data in my application?
I am a student and started working on android studio recently. I don’t know about it much. I am working on an application where I save the item name and its amount in the database and display toast …
SQL: how to select distinct values with an offset
Given the following table: id value ——- ——- 0 1 1 6 2 7 3 9 4 2 5 20 6 21 7 3 I’m wondering if there’s a way to select distinct rows where there’s a difference between (integer) values of (for example) 3, giving a priority to id (low id value = more prioririty). Programmatically, I would iterate
SQL: Using CASE over TABLE that has been GROUPED
I am working with an SQLite Database that has a table CarUse with three fields CarID (VARCHAR(20)), tDate (VARCHAR(20), and Kms (INT). The goal is to create a table that will summarise the Kms over …
What is the maximum value for STRING ordering in SQL (SQLite)?
I have a SQLite database and I want to order my results by ascending order of a String column (name). I want the null-valued rows to be last in ascending order. Moreover, I am doing some filtering on the same column (WHERE name>”previously obtained value”), which filters out the NULL-valued rows, which I do not want. Plus, the version of
How do I add a count() for one table into a SQL query that has joins for multiple other tables using SQLite?
I have a sql statement that pulls data from multiple tables. This query gets all employees and their biographic information (employee id, first name, last name, badge image, etc.): SELECT e.ID as id, …