I want to get the IDs of rows with the same name in a Table. Here is an example of my table, I want to get ALL the IDs of the duplicates names of id n°1. Here are the duplicates value of id n°1 : 1, 3 and 4. Now this is what I want to have: Thank you 🙂
Look up in same table with different value reference sql server [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I’d like some help with a code. I have TableA where Btime is sometim…
Building Subquery to be a column/Field Name
I am unable to bundled groups of subqueries correctly in order to create column titled “Discharge_To” I am using Teradata Studio Express. I was asked to create a column for field that is not inside a …
Find common value from a column where value from separate column matches 3 different values
Apologies for the poorly worded title. I was not entirely sure how to describe the issue. It’s easier illustrated too me. I have a database table that lists content ids and values. One ID can have different values so id = 1 may have 1 or many rows depending on how many values are associated with it. I w…
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: Having multiple conditional Averages between two tables
I have two tables Sample from e.g. T1 ———————- ID || Operation Name | ———————-| 101 || QA | ———————- Sample from T 2 ————————-…
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 …