Is it possible to assign several rows to a single row of a different table? Doing purchase order I have a table for Suppliers then under that I have items that are in the different table. Giving me …
Send mail every N days in SQL
I need to send a warning mail 14 days before certificates valid_to date ends and also send email every 3 days from delay_days. Table Certificates consists of: ID(int) | cert_valid_to(date) | …
Searching multiple rows that are not in a relationship n:m
Similar question here Very similar to the question above but with a slight difference, I need to find a list of users that haven’t seen at least one film in a list of movies. Assuming two tables ‘…
Hive Case Resulting Duplicate Row
I have a table containing contact numbers and another reference table containing a “length” variable and a number column. What I need is to find the prefix name where the prefix of the number matches …
Anaconda: Despite of installing can’t import ibm_db
I am able to install ibm_dbpackage in order to access DB2 from Jupyter notebook: !pip install ibm_db Requirement already satisfied: ibm_db in /anaconda2/lib/python2.7/site-packages (2.0.9) but while …
How to run a query to get results of last 12 months ( BigQuery)
I want to get records for last 12 months for a particular ID in Big Query table. I have extracted month and year as separate columns from the original timestamp column. I tried using date_add() and …
Mysql: GROUP BY custom date interval
Situation : a table where every minute X energy device saves its consumption. I have to calculate the daily consumption (at hourly intervals, 00 – 01 – 02 – 03 – 04 ….. 23) of a single device on a …
select every 100 lines, one line SQL request? [closed]
I have a table that contains 50000 lines for example. I need to select 50 lines from table that contains this 50000 lines, so I need to select every 1000 lines, one line. for example divide 50000/50, …
Update SQL rows from another table and a static value
I’m attempting to create rows in a temporary table using values from another table as well as static values. The best I could come up with is this snipped of code, using multiple queries. I’m curious …
SQL error when inserting a function variable
I try to use a value resulted from a 1st function as argument into a 2nd function, but SQL give me the error cannot be NULL Erreur de la base de donnĂ©es WordPress : [Column ‘option_price’ cannot be …