I want to implement the below query But IN statement is allowing only 1 column. ...
I want to implement the below query But IN statement is allowing only 1 column. ...
I found a strange bug (I guess) in mariadb Suppose you have a table table1 with col1 and other table2 with col1 and you want to list all row in table ...
The database is from CS50's introduction to Computer Science course, Psets 7 | Movies. https://cs50.harvard.edu/x/2022/psets/7/movies/ When I run thi ...
I am using Postgres and I would like to put together the following sql queries together in only one statement, like this: but I get the syntax e ...
Have a table test. b is a text column and contains Apartment,Residential The other table is a parcel table with a classification column. I'd like ...
I'm new to SQL and I am trying to write a query on PostgreSQL to find the cust_ID and customer name of each customer at the bank who only has a loan a ...
Using ClickHouse, my query is failing if I pass into the query an empty set to IN clause. This works: This fails: Error: Apparently some fla ...
I have a Exercise table, and a Tag table. Each exercise can have several tags so I have a third table for the one to many relationship. What I try to ...
Given a table: userid activity count 1 RoomC 4 2 RoomB 1 ...
Given a table: userid activity location 1 RoomC 1 2 RoomB 1 ...
I have 3 tables: Scorecard Group Scorecard_Group (Joint table) I am trying to write a query that fulfills the following purpose: Get th ...
Suppose that my query: return this results: I need to change my query to get results grouped by Name but ordered by modified_date desc for the f ...
I have a Home Assistant sqlite file. My problem is that it grows fast and reaches enormous dimensions. So I made a php script that cleans it every 24 ...
I have the following table Given a list of IDs, how can I test whether all of those records have the same foo value? For example selecting ids in ...
My Sample Sql is Is possible to include ilike or ~* in IN Operator in Postgres? My solution is i think it is not correct method, Please le ...
Having this one: Reading this one: Changing IN to EXISTS in SQL Tried to change it into "Exists", but produced this and it did not work: The ...
I have a following query SELECT * FROM products a, productImgs b WHERE a.visible = 1 AND a.Type IN ('Accessories', 'Clothing', 'Electronics') ORDER B ...
I am building a simple application using MySQL as the database. I have a user table with varying information, but I also have a friends table. Each us ...
Is it possible to match a list of patterns in SQL? I know of the following way to match a single pattern: This can be exbanded like; ... etc I ...
Let's say we have two tables: The element has a composite PK. The custom type element_pk_t registers a matching composite type. The collection tabl ...