Say my the schema for these two tables is as follows: owner —– pk owner_id int owner_name text possession —– pk possession_id int possession_name text fk owner_id int Now, say the the records …
return number of hashtag posts sql, mysql
I have two tables, 1) hashtags table & 2) hashtags_relation table. The first one lists the hashtags, and the second one relates the hashtag with a post. TABLE HASHTAGS id_hashtag | hashtag | …
Calculate proportion (percent) [closed]
Could you help me to calculate proportion of Table user_id attendance Date 1 1 01.01.2018 2 Null 01.01.2018 3 1 02.01.2018 4 …
Connection failed: SQLSTATE[HY000]: General error: 1366 Incorrect integer value
Basically I’m trying to get an ID from a url and insert it into a database, initially I had an undefined variable error, so I looked around and I saw a few threads suggesting $id = ”; to remove this …
MYSQL Select values of sub query result in main query [closed]
My sql query is SELECT c_id , name , stu_id , option_id , expiration_status , expiration_date_type , expiration_date_val FROM options WHERE option_id …
Get product variation id by their product attributes slug values pairs in Woocommerce
How can I get product variation ID by taxonomy terms? For example if I have two taxonomies and their terms: 1) Size: medium, large 2) Color: blue, green And my product variations: Variation id 1: …
Add Current YTD / Total Last Year comparison columns
We have two types of records: externals (acc), and internals (referred just as records). Currently my query returns (acc) monthly totals, and (acc) totals from the date of implementation of the …
return the Nth word from database
I want to get nth word from a column I’m using a code line and it works for me but there is an issue, for example: First line is: “the Nth word from database” Second line is: “return the Nth word …
How to aggregate multiple points by two columns and create a LineString / MultiLineString out of them
I have a table called locations that has these rows: id uuid NOT NULL, “deviceId” text COLLATE pg_catalog.”default”, “userId” uuid, “userName” text COLLATE pg_catalog.”default”, “creationDateTime” …
How to search if a row is a substring of another row of the same column in Oracle
I have a table that contains millions of rows for names of customers as a column. I want to find if a part of a name exists within another row in the same column. E.g. If a row has value ‘Roger …