Incorrect parameter count in the call to native function ‘str_to_date’

There is a table tab1: |creation_date | acc_num | status| |——————-|———————|——-| |31.03.2021 07:43:43| 11111111111111111111| deny | |31.03.2021 07:43:43| …

Calculate the number of unique strings with the date, with a possible error

In the select, I get rows from the table with time in the format TIMESTAMP. I want to count unique rows, BUT with a possible error of 1 second. In the example below, for example, 3 unique records (1 …

SQL result from table a but name from table b

My request is quiet simple however I can’t find it (maybe I can’t goolge correctly). I have Table A and Table B Table A: ID length 1 50 2 45 2 20 and Table B ID name 1 apple 2 orange I want …

Writing SQL Queries Workbench

I’m having some trouble with writing this query. This is what I have so far: Find the name of the customer that deposited the highest amount with one transaction (include the transaction amount). …

get aggregation values by other values in sql

I have two tables that looks like this in their schema : create table PRODUCT_NOMENCLATURE(product_id integer, product_type varchar(100), product_name varchar(100)); insert into PRODUCT_NOMENCLATURE(…

SQL : Keep ONE row with max value on a column depending on value of another column

It’s well documented on StackOverflow how to find the whole data for the row with some max value in a column per some group identifier (SQL select only rows with max value on a column). But that given …

How can I pass multiple parameters to identify a page?

I currently have one question and that is if I can pass 2 parameters in my url to identify a page. Currently I have this code, which gets me through the parameter “url_slug” my post stored …

SQL: How to check if group of rows already exist in a table

I have a simple chat functionality in my application where signed up users are able to create chat groups with other users. To store the information which user is a member in which chat I am using a …

Aggregating data percentage wise based on date related criteria from a table

I have legacy tables which tracks flight and had to extract data. We have three tables named booking, airlines and flighttype. Note this is a dummy samples booking : id customer request_date airline …

get started minutes from 0:00:00 type values

I’m not really used to sql but I have a csv file with a lot of rows and columns so I decided to do the needed work in sql. I have a Table with 3 columns and a few thousand rows. Column duration is …