I have some lines of SQL which will take a set of IDs from the same GROUP_ID that are not contiguous (ex. if some rows got deleted) and will make them contiguou
I'd like to write a SQL Query to extract data from a SQL Table into the SSAS Table. I do not have this option available, as normally I should go over 'Model' &g
string subject= "INSERT INTO Subjects (ThesisNo, [Subject]) VALUES (2, @subject)"; SqlCommand commandSubject = new SqlCommand(subject,con); string temp
Question on SQL Suppose there is a table.
I was attending a question in hackerank advanced SQL certification, i came across a question like to find the maximum, minimum and average of temperature . i wr
I have a transaction table which contains date, transaction_id and category (it is a sales table of clothes). It looks like this: ndate transaction_id category
I'm new in Doctrine ORM, and I need help with building QueryBuilder command. I have a SQL command and I need covert to QueryBuilder. $qb = $this->entityManag
I have a table like this: I would like one address for each account number, if the account number has two addresses, I want to get the one wi
I am new to PostgreSQL and I need to import a set of csv files, but some of them weren't imported successfully. I got the same error with these files: ERROR: e
Let be a table named data with columns time, sensor, value : I want to pivot this table on Athena (Presto) to get a new table like this one : To do so, one ca
SELECT d.millid, d.bookno, d.partyname, d.count, d.counttype, d.orderqty, d.dispqty, d.pending from ( SELECT b.millid, b.count, b.counttype, b.bookno,
Struggling to understand why my query is taking ~8-12s to complete when my table has millions of rows. I can force it to use a specific index, and depending on
I have a date field in one of my tables and the column name is from_dt. Now I have to compare a month and year combination against this from_dt field and check
I have a shema database in file type XSD this file contains descriptions of all tables. My question is how I can use this file to create a database in MySQL. i
With a table like: uid | segmentids -------------------------+---------------------------------------- f9b6d54b-c646-4bbb-b0ec
Essentially, I'm trying to figure out the size table foo will be after executing: CREATE TABLE foo AS ( SELECT * FROM my_view ); My gut tells me that the
With a table like: uid | segmentids -------------------------+---------------------------------------- f9b6d54b-c646-4bbb-b0ec
I'm trying to order a query based on the comma separated result of another query SELECT t.field1, t.field2 /*, ...*/ FROM table t /* ... */ ORDER BY CASE W
I am new to SQL and SQL Server and I am using SQL server 2012. but recently I encountered a weird thing while working with SQL server. I got that adding DISTINC
I have done my best to neatly format the meta recruiting question below. My current query that I'm trying to ascertain the ratio is this. Returning correct 2/3