Let’s say I have a table I want to update based on multiple conditions. Each of these conditions is an equal-sized array, and the only valid cases are the ones which match the same index in the arrays….
Select rows with at least one instance of the where condition
I am new to SQL. I have the following query that selects all rows with at least one 1. select * from numbers where n1 = ‘1’ OR n2 = ‘1’ How do I select rows with at least one 1 and one 2? For …
Multiple categories on one line
Trying to identify individuals in 2 groups, showing the id of the person, and the two group names on one line. Tried case statements and joins but they are showing up on multiple lines. So that one …
Identify database records that point to each other
Let’s say I have a database of user records and each time the user takes an action, a record is stored. Each action has a “parent” action in the database, and has a column that points to the id of …
Calculated fields on timescale
I’m trying to add calculated fields to my hypertable with sensor data, e.g., I would like to add the derivative of the volume readings to get the volume flow. I have tried to do this with a …
Sum of column from subquery
The below diagram represents relationships between three tables in an Access database. Table [Shared Mailbox] contains a list of shared mailboxes (SMB) in Exchange. Table [Shared Mailbox User] …
How to use dbWriteTable on a connection with no default Database
I’ve seen many posts on SO and the DBI Github regarding trouble using DBI::dbWriteTable (i.e. [1], [2]). These mostly have to do with the use of non-default schemas or whatnot. That’s not my case. I …
How can I get the last date of different activities in a access table?
I want get the last date of each service. I would like to achieve the following: I tried this but it just get the record when the selected service have the last date Answer I think you want:
How can I combine these 3 different queries into one?
I have 3 queries in a MySQL database that output all the same fields except the last one, which is a calculation. I would like, if possible, to combine them into one query that outputs the common …
How to search JSON data associative array mysql 5.5
I have stored JSON associative array data in the column of the table in MySQL 5.5. I want to search in JSON at one specific array key with key and value my JSON structure : So for search by Key Value, I have this query : It is working fine but my problem is that I can not select Interface_1