I keep getting mysql errors when I try to write joins or unions combining these two queries. field1A and field1B are the conditions I am trying to count. SELECT count(*) FROM `table1` c1 LEFT …
How to find the row and column number of a specific cell in sql?
I have a table in SQL database and I want to find the location of a cell like a coordinate and vice versa. Here is an example: 0 1 2 3 …
NodeJS MySQL apostrophe reduplication with INSERT query
I’m doing my project Nodejs and MySQL and I have some problem with query with apostrophe. I got all of the data from github api and it normally works fine. but If data have single apostrophe(‘), it …
Mysql query for finding followers and following
Here are the two tables: 1.user user_id | full_name | username 1 A A_1 2 B B_2 3 C C_3 4 D D_4 …
Java sort list alphabeticaly with value “Other” at the end
I got a small Spring Boot application that manages some projects and clients. A client has a country ( which is an entity) and I want to let the user when he wants to create/update his clients to …
Oracle max function on timestamp datatype
I want to take a max date from a timestamp datatype in oracle my data look like this id updated_date — ——————- 1 2011-12-21 10:34:24 1 2011-12-21 09:52:15 1 2011-12-21 10:02:49 …
“Incorrect syntax near ‘)’.”
I have a program that is to take a couple inputs and do stuff to them then store them in a local database (using SQL Server). I have the following code for the connection: SqlConnection con = new …
Selecting string after the last \ using regex with Impala SQL
I have a dataset with a column with processes and the path. I am trying to use regex with Impala to strip off the executable. The dataset looks like this: C:\Windows\System32\svchost.exe C:\…
CASE clause in WHERE
I’m doing a leetcode question. 2 similar answers are worked out. But I have no idea why one is wrong and the other is right. The following is the question link. The goal is writing a SQL query to find all numbers that appear at least three times consecutively. https://leetcode.com/problems/consecutive-n…
Datediff in mins, taking into account custom bank holidays, maintenance days and working hours
I have a table (table1) which includes columns [deadline] and [completion], both of datatype datetime. I need to calculate the date diff in minutes between [deadline] and [completion]. For example: …