Skip to content
Advertisement

Tag: sqlite

Variables in SQLITE Python

I am working in Jupyter Notebooks using pandasql, which uses SQLight syntax. I am trying to select entries from a certain month, depending on a variable. I am planning to create a Python function that will change the value of the variable being used, but right now I am trying to get “Parameterized Queries” to work. My table has the

How do I remove duplicate data in SQL?

I need to display lines that are not repeated, but only with their neighbors, they should remain in the entire database (also in a single copy) in sqlite. Here’s what I’m missing: Initial database: What should be output: Thanks 🙂 Answer Using Lag and Case:

Timestamps and addition of weeks

My query requires me to find the number of people positive and their infectious periods which is plus and minus 2 weeks. In my query below I keep getting null in my 2 weeks Timestamp What is wrong with my equation and why won’t it add the 2 weeks in the next column? In DB browser this is the format

SQL Select from many-to-one

I have two tables containing a one-to-many relationship. How should I select the “one” side given information for the “many” side? I’m using SQLite. Let’s say our first table, T1, is about cars and the second table, T2, is about the imperfections in each car. Let’s say we can describe the imperfections with an integer. So we have: We have

Filtering by dates saved as strings in SQL [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I’m developing a program in Java that saves medical information of employees, and within it, there is the date of

Advertisement