Skip to content
Advertisement

Counting unique values within a time window

I have data that looks like (over 100.000 rows): What I would like: Explanation CONTEXT I want to find out how many people (person) are working in the same location (Location) by looking at a time window (timestamp) of max 10 minutes and checking whether a person is really working simultaneously or just taking over their shift within that frame.

Split Characters in a cell to individual columns [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 months ago. Improve this question I have a dataset where a column contains 1 and 0 in a single cell which reference security authorities in a software program. I need

Joining 2 Queries without Common Column Fields in SQL?

My issue is in reference to a similar post: Joining tables without a common column in sql server I have 2 queries, each query references different tables, hence the queries do not have common column fields. I want to join the 2 queries together. Let’s take for example the 2 queries has the following data: Query1 Query2 Expected Query3: The

SQL Query to check not repeated values

I’m new to SQL. I wanted to know, How to check the entries which are not repeated for the other entries. Better I give one example. column1 column2 a 1 a 2 a 3 a 4 b 1 b 2 b 3 b 4 c 1 c 2 c 3 I want output as column1 column2 c 4 because c

Get movies that have categories

I have associative table movies and their categories. How can i get movies that have category 1 and 2? Result: Answer Do GROUP BY. Use HAVING with COUNT DISTINCT to make sure both 1 and 2 are there. Just for fun, you can also do a self join: Or, use INTERSECT:

SQL to append records

I have two tables tbl1 and tbl2. Consider tbl2 as the main set and tbl1 has been derived from other sources but will essentially now be a subset of tbl2. tbl1 cd productcd type 1 1 A 1 2 AB 1 3 A 2 3 AB 2 4 AC 3 1 A tbl2 cd productcd type priority 1 1 A

I wanna create a new table from the data of two tables

I have a A table to store the product name, the quantity and input day of goods in stock. In adverse conditions, invoices for the above products will be sent later. I will put the product name and invoice quantity in B table. The problem here is that I want to check the quantity of goods with invoice and without

Advertisement