This is a follow-up to the question Why doesn’t BigQuery perform as well on small data sets. Let’s suppose I have a data-set that is ~1M rows. In the current database that we’re using (mysql) aggregation queries would run quite slow, perhaps taking ~10s or so on complex aggregations. On BigQ…
Convert SQL Integer into c# string for combobox (Access Database)
The following code gives me an IndexOutOfRange error. ‘Baujahr’ is an integer column in my access-database. cbFahrzeugBJ.Items.Add(reader[“Baujahr”].ToString()); Here the reader: OleDbDataReader …
How to simplify nested select in where clause?
I have 4 tables EMPLOYEE, COMPANY, WORKS and MANAGES. The tables are defined as follows- I need to find all the employees who live in the same city as the company for which they work. So far I have done this. It’s working fine. But I want to know is there any simpler way to do this query? Answer You
C# win forms app hangs
The following code is for reading from an Access DB and transferring to a SQL DB. Can anyone tell me why this code just hangs after it is run ? I have a label that should change telling me the row that is being processed but the Form just sits and becomes unresponsive once I have clicked the button. Everythin…
How to compare two columns in the CASE statement
I have two columns Speed_A and Speed_B. Now I will compare both columns and will select the higher one in a new table. Something like this: How does it work? Answer Assuming your speeds are numerically typed you might get this as easy as: Your ELSE will only occur, when A and B are equal, In this case it does…
SQL Query Where Date = Today Minus 7 Days
I have a SQL table of hits to my website called ExternalHits. I track the URL as URLx and the date the page was accessed as Datex. I run this query every week to get the count of total hits from the week before, and every week I have to manually change the “between” dates. Is there some way I
Migrate from Azure SQL back to Access
I have a SQL database in Azure. Is there any way of downloading the SQL database in .mdb format?
Presto create table with ‘with’ queries
typically to create a table in Presto (from existing db tables), I do: But to make my code simple, I’ve broken out subqueries like this: Where do I put the create table statement here? The actual query is more complex than the above so I am trying to avoid having to put the subqueries within the main qu…
Calculating percentages based on a few columns in a subgroup
I have a table (let’s call it Table A) like this: ID Device Clicks 1 A 10 1 B 10 2 A 1 2 C 19 I would …
SQL – listing members on enrolled classes
I am trying to figure out why this isn’t working. I am trying to select each member’s names and the classes that each member is enrolled on together with the class trainers name. This is what I have at the minute: Any help or tips would be appreciated as I am still learning SQL. Extra info: enrolm…