Skip to content

Tag: sql

Table Aliases into Subqueries

(Submitting here to assist other Snowflake Users who may run into similar challenges… Interested to see if there are any additional recommendations beyond what’s bee provided already.) Why doesn’t table alias work into subqueries? I was using a sample table select query but it doesn’t …

What expression could allow a tuple with NULL attribute to pass

For common expression like a + b > 5, it is obvious that as long as b or a is NULL, the the expression would not be true. In other words, the the null attribute could not pass this expression. However, expression like coalesce could allow a tuple with NULL attribute to pass. For example, coalesce(a,b) >…

Extract substring address SQL

I have a table with column Address which is like city. City_Name, citysector. CitySector, Street. Street_Name, StreetNumber. Street_Number EXAMPLE Address c. Paris, s. ParisDowntown, str. Rue Étienne Marcel, nr. 50 How can I substract 4 different columns like city, sector, street, streetNumber from Address co…

Multiline query execution

I am the Lead Developer on a web-based corporate tax payment application written in C#. My boss asked to develop a script to get him some relevant data from our application. Now he’s asked me to port it to a Desktop Application so he can run the script himself and not have to ask me for the report every…

SQL count Occurency trouble

I’m pretty new in the SQL world and i have some troubles about counting some row. I explain myself: I have a DB like this: NAME | (somenumbers)| L1 | 2 L1 | 2 L2 | 3 L3 | 1 L3 | 1 L3 | 1 …