Skip to content
Advertisement

Tag: sqlite

Get distinct values within time chunks

I have a table with different species and their occurences (timestamp) from field survey: Now I want to count them, not in total but in chunks of 10 minutes each, where only the first occurence is counted. That means between 12:31 and 12:40 there are species A,B,C. Between 12:41 and 12:50 there are species B,C. For a single 10 minute

Find the number of employees working under a manager

I have three tables called branch,employee and manager structured like this I want to view the id of each manager and the count of the employees he has under his supervision like this I have made this so far that shows which branch each manager works on but i don’t know how to proceed with the counting. The solution i

Java Sqlite how to print a.rowname

I asked myself how I print a.rowname in Java with jbdc sqlite. Or did I take the wrong solution to fetch all the Selected data? I tried this: And I get this error: In Python it works kind of like this. I can later just get the Selected data from the array: Answer You do not select a.spieler try: Update

How to get count(percentage) for columns after each groupby item?

I have the following table. Using sqlite DB Item Result A Pass B Pass A Fail B Fail I want to realize the above table as below using some query. Item Total Accept Reject A 2 1(50%) 1(50%) B 2 1(50%) 1(50%) How should I construct this query? Answer You can try PIVOT() if your DBMS supports. Then use CONCAT

Delete the row with the highest date difference

I have a table with values I would like to delete the row with the oldest student. I am able to get the ages with the following command but somehow I cant combine it with the DELETE stament I am using SQL lite Answer This would remove the first of the MAX result if there are some with the same

How can i unlock the Database in Go

Im a newbie in go and not the best in sql. I have a simple Table in my Database with the name of users. I store the SAM, First Name and Last Name in the table. When i now try to change something in the database, i get the error database is locked. Thats my code: decodeJSONBody and checkError work

Advertisement