Skip to content

How to create table from an existing table

I’m in Oracle APEX and would like to create a new table from other existing one like this: I have a column in a SONGS table that is: ARTIST NAME Another header Bad Bunny row Bad Bunny, Ozuna, Daddy Yankee row And I want this in another table: ID Artist 1 Bad Bunny 2 Ozuna 3 Daddy Yankee Also, from

select running by itself but not in subquery

Ok so I’m stuck at something and I need your help. How can this run ok: and this not? The error I get is: 00907. 00000 – “missing right parenthesis” Answer In SQL, in general, table ordering is non-deterministic and an order cannot be guaranteed. Your query: Will fetch rows from the ta…

Conversion of time zone in snowflake sql

I am doing a conversion of timezone from current_timestamp to ‘US/Eastern’ in snowflake view. I was able to create the view but when I preview the data I am getting Timestamp ‘US/Eastern’ is not recognized error. I am converting like below: ((CONVERT_TIMEZONE(current_timestamp, ‘…

Spark.sql Filter rows by MAX

Below is part of a source file which you could imagine being much bigger: After the following code: I would like to obtain this result: The aim is to: Select the dates which each cityname has the MAX total (Note, A city can appear twice if they have MAX total for 2 different dates), Sort by total descending, …