Skip to content
Advertisement

Tag: sqlite

SQLite select query if inner join query doesn’t exists

I have two tables, one for all the foods which contains food id, default name and other foods values. Another table is for the food name translations which contains food id, language id, translation. What i want to do is join between these tables by the food id to get the translation for food id = 5 for example and

Android Studio Null object Reference

Creating an question/answer test application that scores you based on how many attempts it took to get it right (i.e on the first attempt 5 points, 2nd attempt 4 points… and so on) the questions are stored in a .DB file in asset folder and after testing the scoring logic I’m now trying to draw from the database. this is

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

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

Advertisement