I need help How can I merge the column into a single column, here is my code, is this method is correct. I want to get the count of the selected row in the table for the columns. Can you guys help me I’m a beginner at SQL. Thank you in advance Answer If you want just one row in
Tag: sql
SQL case sensitive compare
I like to know with a CASE statement wether two fields are the same. I managed to do it with following query but I wonder if there is a better approach? I just want the ‘=’ to do a case sensitive …
Pass Column Names into SQL statement in dynamic way – Python- SQL Server
Example of ‘fields’ value = name, surname, date I can put ‘fields’ in a list but I do not know how many (?) to put inside the query. Because, fields variable will include sometimes 5, sometimes 10 column names. I am trying to pass column names dynamically to the query. How can I solve …
Query items from a history table
I have a “library” history table (Excel like) to see where a book was or is. id date book action client 1 2020-12-01 1 toClient 1 2 2020-12-02 1 returned 1 3 2020-12-03 1 toClient 2 4 2020-12-04 2 toClient 2 5 2020-12-05 3 toClient 1 6 2020-12-06 3 returned 1 7 2020-12-07 2 returned 2 8 2020-12-08…
SQL – Database table mapper – Insert into table, based on select and joins
This is a life example of the question so you can understand better what we need. EXAMPLE We have 3 tables For each car item we want to keep these data: And 3 ‘spec’ values located in ‘specs’ table, based on ‘car_spec’ table: We want to combine all the required data into on…
MySQL: Select penult values
There are 2 tables: table1: id |phone| order| —|—–|——| 1 | 122 | 6 | 2 | 122 | 4 | 3 | 122 | 3 | 4 | 123 | 6 | 5 | 123 | 5 | 6 | 123 | 3 | 7 | 124 | 6 |…
joining same table multiple times in Oracle
Hi I am tuning one legacy code. we have below 2 tables in a big query. I have seen in from clause first table has been used thrice and it has been outer joined with same column with same table. Can above 3 lines be handled using fnd_currencies table only once. is there any smarter way to do that? Answer
Access: Issue Creating SQL View Through VBA – Unions not allowed in subquery
First of all, let me preface this with something I almost always say in my few posts so far, which is that I’m not an IT/tech person. I’m an accountant who likes to dabble a little bit in SQL and so …
SELECT from a table partition by order and status
So I have the following Searches table: The status is a combination of ClosedOn and ClosedByUserID: Pending: If ClosedOn and ClosedByUserId are null Outdated: If ClosedOn is not null and ClosedByUserID is null Closed: If ClosedOn is not null and ClosedBYUserID is not null I am trying to select all records and…
How does Impala Implements GroupBy Extension(CUBE, ROLLUP and GROUPING SETS) In a distributed way?
I’m Learning how to Implement GroupBy Extension(CUBE, ROLLUP and GROUPING SETS), I’ve watched at FE several times, But I still can’t understand how to use grouping_ids to implement GroupBy Extension throught collaboration with BE in a distributed way.How is it to collaborition with ExchangeN…