I read a few threads on this but noticed most are outdated, with excel becoming an integration in 2020. I have a few excel files stored in Drobox, I would like to automate the extraction of that data into azure data factory, perform some ETL functions with data coming from other sources, and finally push the …
Order results by “Best Match” SQL
I’m working on a project which requires the user to search for certain categories of products. The products have tags such as: T-shirt, Jumper, hat and I am currently displaying the results ordered by the amount of likes. Here’s my SQL statement: But the issue is that if let’s say someone se…
Unknown column ‘r’ in field list
I’ve been working on a SQL query for a project, and I face an error message when I want to use it. Here is the query itself : MySQL answers me “Unknown column ‘r’ in field list”. But I dont really understand why I get an error here as I define r in my INNER JOIN. I’m kinda …
Select last value in each group
In database I have two table. I want to join two tables and get last row each SensorType Sensors table: Id CodeNumber PortNumber SensorType IsActive 13 Dht11 3 0 1 14 Dht11 3 2 1 17 Global 100 4 1 18 Dht11 3 1 1 19 Dht11 3 3 1 SensorsValue table (SensorId is foreign key Sensors table): Id SensorId
VBA ADODB error (80040e14) when trying to retrieve data from SQL Server
I am trying to connect to SQL Server from Excel VBA using the following code and with some specific simple queries it actually works like a charm. My problem shows up whenever I try to run the query right below to which I get the following error: ‘-2147217900 (80040e14)’ An expression of non-boole…
SQL procedure loop on a key from JSON object
I am trying to insert a JSON object into multiple tables CREATE TABLE images ( id serial primary key , image_url varchar(255), filename varchar(255) ); Procedure: CREATE OR REPLACE …
UNION tables with wildcard in BigQuery
I have over 40 tables I want to append in BigQuery using standard SQL. I have already formatted them to have the exact same schema. When I try to use the ‘*’ wildcard at the end of table name in my …
Creating a percentage column to a table that is not in the From clause through PostgreSQL
I am working with a bike share dataset located here and here is a sample month of it. I want to get the percent of rides per day per membership type, so I applied this query through PostgreSQL: SELECT …
Percent Growth Calculation from Single Column
I am trying to calculate the percent growth of a single column (COUNT column) as shown below: DATE COUNT 2017-05-22 20 2017-05-29 42 2017-06-05 123 2017-06-12 21 2017-06-19 535 2017-06-26 …
Laravel query where field is less than sum of another field in related table (polymorphic relationship)
In Laravel trying to query a table for invoices (table name: invoices) where the invoice total (field name: net_total) is greater than the sum of payments made for that invoice. It is set as a …