Skip to content

Tag: sql

How to use prxmatch or alternative for below string in sas

I have multiple rows of strings I want remove and create new column with 25% and 20% and so on… From above string. How can I do that in SAS? The new column should flow 25% i.e percentage. So on…. Answer A single percentage value (or none) can be retrieved from a string using a pattern with a group…

How to convert a query into a nested query

How do I change this query into a nested query? The query and tables are listed below. tables goes as follows Nation : N_NATIONKEY, N_NAME Supplier : S_SUPPKEY, S_NAME, S_NATIONKEY Customer : C_CUSTKEY, C_NAME, C_NATIONKEY Orders: O_ORDERKEY, O_CUSTKEY Lineitem: L_ORDERKEY, L_SUPPKEY, L_QUANTITY, L_EXTENDEDPR…

optimization select distinct query

How can i optimize this query, how to rewrite a request through exists: Answer Please use ANSI style join syntax, first of all. Now, Coming to your question, according to my knowledge NVL perform worse when working with large data sets. So how can we achieve the same functionality? — We can use DECODE o…