I have a tables which stores the type of account users create for a product. There are 3 possible paths. They can either create a trial account, then create a full account. They can create a full …
Finding the person with highest salary on mysql sample database
I have this mysql sample database (https://dev.mysql.com/doc/employee/en/sakila-structure.html). The question is i need to find top10 persons with highest salaries on the database. So far ive tried …
VBA 3131 error in SQL using variables in query
Can you please help me? I was trying to figure it out for about 2 hours but I still have some error in the syntax. I have the following code with String variables which I need to pass into the SQL …
Date conversion in SQL from 10-09-2020 to 2020-09-10
I want to convert it for comparing data & here I am stuck. I have data in date column like 10-09-2020 where convert(varchar, date, 111) >= ‘2020-09-10’ AND convert(varchar, date, 111)
Forcing NULL entries in ACCESS queries
I have two ACCESS tables as follows CustId CustType 1 Silver 2 Gold 3 Gold xDate CustId Value 01/01/2020 2 100 01/01/2020 1 50 02/02/2020 2 100 03/01/2020 2 …
Mysql subtract and sum
I have a below table in mysql. DROP TABLE IF EXISTS `mdc_data`; CREATE TABLE `mdc_data` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tariff_id` int(11) DEFAULT NULL, `msn` varchar(100) DEFAULT NULL, `…
Syntax error possibly due to multiple ANDs?
UPDATE bookings b SET reservation_processed = ‘archived’ JOIN reservation_time_data r ON r.id = b.reservation_time WHERE premises_code = ‘LJJIDHhRN2ho1e3h’ AND reservation_date LIKE ‘%2020-09-10%’ …
Find an entry in sql dependent on other entries in the table
How can I return all entries in a table that contain a string in a given column if the same string is also present in the same column with a given suffix ? So for example, given the suffix ‘bar’, and …
Create Missing Data Hive SQL
I have a table that has an activity date of when things change such as 2020-08-13 123 Upgrade 2020-08-17 123 Downgrade 2020-08-21 123 Upgrade Basically this in relation to a line there are 3 …
How to count non-zero numbers in a comma separated string in oracle sql
Want to count non-zero numbers from a comma separated string in oracle 12.10. If my column has data as 2000,300,0,0 then count it as 2. This gives me 2000 and 300 as result but what’s next to count it. select regexp_substr(‘2000,300,0,0′,'[^,]+’,1,level) from dual connect BY to_number(…