I want to query SO new tags created during last week. We have tables Posts,Tags, PostTags (leave out TagSynonyms for now). Tags doesn’t have CreationDate so we probably need to use join with min(Post….
SQL request from 2 different databases with same structure
I have 2 really similar databases, with exact same structure (one of them is a backup of the other so some values changed which is why they are similar but not the exact same). So here is what I would …
Inserting into table values found from previous query
I have table, let’s say ‘ROLEE’., which contain columns ROLE, ACCESSENTRY. I need to find first rows that ACCESSENTRY is equal to ‘A’ and for these rows insert into that table new rows with fetched ‘…
How to group by and sum in sql
I have tables like following one I’d like to extract customers who has product=a customer product score A a 10 A b 20 A c 30 B b 10 B …
SQL Query scenario
I have a SQL scenario. Could you please help me with the solutions for the same? I have 2 Tables Account & Credit_Score, with the schema as below. ————- Account Table ———-…
Golang: cannot use sql.NamedArg in prepared statement
I have a query that is using NamedArgs from the sql.DB and I’m getting an error when building cannot use args (type []sql.NamedArg) as type []interface {} in argument to stmt.Exec The example in the …
SQL Adding extra rows until dates (YYYYMMDD) columns match
Table1: ID|StartDateID|EndDateID 468|20200101|20200104 534|20200103|20200104 123|20200106|20200108 Required output: ID|StartDateID|EndDateID 468|20200101|20200104 468|20200102|20200104 468|…
Stored procedure with 2 Like parameters
I am looking to use a stored procedure to filter my datagridview by either the user entering the part name into txtPartName or MRPID into txtMRPID. However, this is not filtering as expected and just …
Compare last row to previous row by group and populate new column
I need to compare the last row of a group to the row above it, see if changes occur in a few columns, and populate a new column with 1 if a change occurs. The data presentation below will explain …
Issue not getting a result when stuff is used
I am using the stuff function to create an comma separated value stuff works if I run it alone, but when I use in combination with another column to check against, it is failing. Is it due to datatype …