I have a data set of record numbers, with multiple values in a column for each record. I would like to produce a table where within each group it returns the minimum non-negative, non-NA value. But if …
Grouping sql result by a specific criteria
i am writing a query that supposed to show for a set of users, what emails he/she received, and if the email was open or not. This is the result of the query: Product | Year | Month | …
Data selected from SQL database from top item in checkboxlist is copied to all Gridview rows
I am trying to create a grid view table where i want to show some selected data from a checkboxlist. THe problem is that whenever i select some data from the checkboxlist, the gridview will only show …
i getting this error: The ALTER TABLE statement conflicted with the FOREIGN KEY constraint “foreign_key1”
CREATE TABLE singer( name varchar(50) primary key, email varchar(50) not null, account_number varchar(50) not null, balance int not null ); create table song( id int primary key, …
How to ‘create’ NULL data in Teradata SQL for non existing relations
I have 2 tables, one lists features with a feature value that an account might or might not have (TBL_Feat), the other lists the accounts (TBL_Acct). I’m looking for a query to give me all features …
PHP and Mysql, avoid multiple loop queries
I have a table myTable that looks like this: +——-+——-+——–+————+ | Id | Agent | Qualif | Date | +——-+——-+——–+————+ | 1 | A | Q1 | 2019-05-…
How to write a WHERE clause for NULL value in ARRAY type column?
I created a table which contains a column of string ARRAY type as: CREATE TABLE test ( id integer NOT NULL, list text[] COLLATE pg_catalog.”default”, CONSTRAINT test_pkey PRIMARY KEY (id) …
detect cycles in a graph in SQL using recursive common table expression
Given a directed graph having a cycle, how do you detect and list the cycle using only standard SQL ? input = graph edges and a root node from which we compute the transitive closure. Output = …
SQL query for column numbers
I have a table with information like : With these 2 columns I need to pull a column like “New Column” which is basically serial numbers of pages for each order. I tried ROW_NUMBER() OVER(ORDER BY …
How to Insert bulk Array of data in mssql table using nodejs
I am using node-mssql, LInk : https://www.npmjs.com/package/mssql i want to insert bulk array of data in mssql database i am getting array of array records eg: [[row1],[row2],[row3]] i want to …