Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I am beginner in sql. Anyone please tell me the problem of my customised query. Error Code: 1…
Dramatic decrease in performance for Postgres query on Google SQL compared to my laptop. Why?
A rather complex (depending on standards) query running on a table with about 1M records. Creating some temporary tables and building arrays and jsonb. On localhost I get average of 2.5 seconds. On Google SQL I get 17-19 seconds. Note: Other queries, like simple selects, are faster on server than on local. As…
IIF statement to filter Access Query with checkbox
I’m working on a search form based off a single table. I’m working primarily in the query design view. I’d like to have a checkbox on the form so if it is checked (true) it will only return records where the setID is Null. If unchecked (false) it will return all records regardless of if ther…
Relational Model – DBMS
I was going through some exercise problems to check my understanding of the relational model. According to my understanding, if we are given Album[mid] ⊆ Musician[mid], we can translate it into plain English as “Every album in the Database must have at least one musician”. If my understanding is r…
Postgresql reference a variable within statement
I come across this scenario frequently in sql and I have seen it done, but would like to summarize the case when/when not to reference a new variable within a statement. This doesn’t work – but this does – How can I implement scenario 1? Answer You can use a subquery.
SQLI Query not Updating NULL
I am having a problem with updating a NULL value in SQLI. There are no errors but it just stays at null. I am trying to get every NULL value in the optional_security_question and turn it into Not Available instead. Answer Try to use this syntax:
Use SQL to ensure I have data for each day of a certain time period
I’m looking to only select one data point from each date in my report. I want to ensure each day is accounted for and has at least one row of information, as we had to do a few different things to move a large data file into our data warehouse (import one large Google Sheet for some data, use Python
I need to group by year and month from a timestamp structured as yyyyMMddHHmmss 20170227141500
I need to group by year and month from a timestamp, structured as yyyyMMddHHmmss 20170227141500 (Google’s bigquery gkg table). I need to count the year monthly records. Data type is integer. timestamp is the column name. In fact, I need to gruop by first 6 digits of the timestamp. yearmonth is my group …
LINQ equivalent of this subselect
“Tasks” table: “Task History” table: Sql query: Which tasks were completed in the last 30 days? Q: What is the equivalent LINQ expression for this SQL query? Answer This query should do what yo want:
mysql Duplicate entry error for primary key with similar values
This is how i created my table, i have composite key columns. now, im trying to insert this two values that are the same except for the last character ‘t’: value1 = testbtc:testusd value2 = testbtc:testusdt output error: it just makes no sense, they are not duplicated, is something missing on my t…