EN VI
Posts (0)
Questions (39)
2024-03-13 16:30:06
You can split the string into individual characters and then use MATCH_RECOGNIZE (from Oracle 12 onwards) to perform row-by-row pattern matching to look for consecutive ASCII values: SELECT value FROM...
Tags: sql oracle
2024-03-13 21:30:04
Use conditional aggregation: SELECT COUNT(CASE WHEN LOWER(nazwisko) LIKE '%a%' THEN 1 END) as "Ile nazwisk z A", COUNT(CASE WHEN LOWER(nazwisko) LIKE '%e%' THEN 1 END) as "Ile nazwisk z E" FROM...
Tags: sql oracle
2024-03-13 23:30:05
You can use Not Exists select plz from table t1 where not exists (select 1 from table t2 where t1.plz = t2.plz and ort = gemenide)
Tags: sql MySQL
2024-03-14 00:00:08
The order of columns would not change, the CTE "inherits" the metadata for the ordinal position. Think of a CTE in this case as a regular view, views have their ordinal positions too.
2024-03-14 00:00:09
You need a conditional aggregation query for this - WITH data AS (SELECT '001' EMPLOYEE, 'Basic' ELEMENT, 100 VALUE, 'Sales' DEPT FROM dual UNION ALL SELECT '001', 'Rent', 300, 'Sales' F...
Tags: sql oracle pivot
2024-03-14 11:00:04
Use a cross join between the two tables: SELECT t1.column1, t2.column2 FROM FirstTable t1 CROSS JOIN SecondTable t2 ORDER BY t1.column1, t2.column2;
Tags: sql sql-merge
2024-03-14 18:30:07
We need to count the occurances by date and browser using GROUP BY and COUNT(), then apply jsonb_object_agg to aggregate browser/count pairs as a JSON object using jsonb_object_agg() : select min(id)...
Tags: sql postgresql
2024-03-14 21:00:05
Find first row using the FIRST_VALUE analytic function and then use the SUM analytic function to find a cumulative total and subtract: SELECT id, dt, amount, -- Find the first...
Tags: sql oracle recursion
2024-03-15 03:30:08
Yes it is possible, Snowflake has MONTHNAME function returns 3 letter Month names. You can set a variable at the beginning of the stored proc and use in the table name set dt = to_date('2024-04-01');...
2024-03-15 04:00:15
Your guess is exactly right: the PK uniquely identifies the row, and things cannot be more unique than just unique. If memid is unique, any combination of the field with any other field from that tabl...
Tags: sql postgresql

Login


Forgot Your Password?

Create Account


Lost your password? Please enter your email address. You will receive a link to create a new password.

Reset Password

Back to login