I need to get the SUM of 2 different Totals. One is just the Total and the second one is the Total that only includes products that are sold for less than $25. SELECT SUM(Price) AS Total FROM Sales (…
Can’t find a solution to a problem relating three tables and join operation
So, I am not able to solve the following problem. Three tables are given: tables I need to write a code using join so that all pairs friend pairs are listed with their full names. I only know that …
Find date difference in Oracle SQL based on condition
I have a table: table1 tran_id user_id start_date end_date 1 100 01-06-2018 18-06-2018 2 100 14-06-2018 14-06-2018 4 100 19-07-2018 …
How to build a query that pulls in a listing of employee ids for employees that have a value that occurred on a range of dates unique to employee?
I need to pull in the distinct employee IDs for any employee who had a corrective action with a list of corrective action type IDs within 180 days of their corrective action date. so if I have …
MS Access Transform Query to MySQL Query
I am moving a MS Access database to MySQL and I am running into a problem with a few of the queries. I am about 80% finished with transferring the queries, but this particular one is giving me …
How to get single row from multiple rows having same ID?
I have multiple rows for same ID. How to display any one row per unique ID? I tried select Col_1, Col_2, Col_3 from Table group by Col_1. But this throws error saying, Col_2 and Col_3 is not in …
INSERT repeating values in SQL
Trying to find a simple way to insert some repeating values in two columns in my table, something similar to the rep function in R- for instance, I need to insert two values (chocolate and vanilla, …
Error in sending and recieving json object from Android to php using JsonObjectRequest method
I want to make a custom select query on a table stored in a remote database for an android app. The following is my php file that takes tablename, fields and condition from POST method and makes a …
How to use variables in query_to_pandas
Just got dumped into SQL with BigQuery and stuff so I don’t know alot of terms for this kinda stuff. Currently trying to make a method for which you input a string (the dataset name you want to take …
Sql where statement with = works but LIKE does not
Sql where statement with = works but LIKE does not Is there a fix for this? Here is the exact code: create table zSyn (xField nvarchar(255)); insert into zSyn(xField) select ‘DEVCON 5 Minute Epoxy …