Following is a sample of query I am working on right now: On compiling, it is throwing a “missing right parenthesis” error. I checked, but all the parentheses are accounted for. Can somebody help me? Answer The actual error you are seeing is caused by the date_arrived column with NOT NULL being pl…
Tag: sql
BigQuery error “Query returned no results”
Or changing the query to this: And other address like this do not pull up the address or amount: Error message: This query returned no results. Answer Just lower it 🙂 Looks like you accidentally changed your address to UPPERCASE or BQ stored it in LOWER case … anyhow if you lowercase the addresses as sh…
Split data in column based on value of in another column
I have a table full of Artist and Track Titles that is imported from two different places. Some are correct with Artist and Title in different columns but then there are other rows where everything is in the Title column separated with ‘-‘ and the Artist column is NULL. Changing it at the source i…
How to query SQL Server Agent – all jobs’s error message result set
Question: how to query SQL Server Agent – all jobs’ error message result set Input: Expected result: What I’ve tried & know: I know Job Activity Monitor GUI form can do it, but it only contains last run as shown in this screenshot: Answer I searched msdn and found dbo.sysjobhistory (Tran…
Calculate Time spent by users on the platform
I’m trying to calculate the time spent by users on my platform on a weekly basis. I have the following api_request_logs table (*Note: each row is duplicate) I tried this query, however, it doesn’t seems it is outputting correct calculation . Current output: Desired output : What I’m doing wr…
How to merge rows in sql
I am trying to understand how to merge two rows (which are the same) into one. They both have data that needs to be in the same row but the raw data currently has split them into two rows. Essentially,…
Need help to build a sales funnel report by sql query
I have created a view for sales.In this view, there are relations among lead, opportunity and quotation. We can see not every lead turns to opportunity and quotation. LeadID OfferingID QuotationID Product Salesperson Department Date Salesprice My final output for the sales funnel for all department will be li…
Python/Excel/SQL column dates to exploded rows
I have an Excel spreadsheet table like this where it shows how many units were sold each week for 2019 and 2020 (columns) and I am trying to put it into an access database formatted like the second …
SQL string in access VBA not behaving as expected
I have a bit of access VBA that for the life of me, I cant work out what is wrong. First off, here is the offending section of code, and I’ll explain what I want and what it’s doing below. …
inserting data from another project table in BigQuery
I’ve created two table , “conversion_log_” on project1 and “test_table” on project2 in Google bigQuery. I have been trying to select and insert data from conversion_log_ to …