Skip to content

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 wo…

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 …

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). Progr…

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 row…