Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
54 views

enter image description hereI have two tables that I need to join together and i'm possibly overthinking the issue. Baseline table has a entry for each month. In the actual table most applications ...
jc_sql's user avatar
  • 1
Advice
0 votes
0 replies
38 views

I have the following issue: I have a line and polygon layer, and I want to add every polygon feature to the lines they intersect. Every line should then have new columns, e.g.: id_polygon_1; ...
l0mbardit's user avatar
0 votes
1 answer
91 views

I'm trying to left_join data2 to data1, so that I end up with data3 data1 <- data.frame(ID = 1:4, Time = 0, X1 = c("a1", "a2", "...
JBL's user avatar
  • 49
-8 votes
1 answer
133 views

I am uncertain about how to merge data from multiple sheets using only the file name, especially when the file names vary in case. C:\Report\overview.csv: overview.csv. Issue Name, Issue Type, Issue ...
Mahendran V M's user avatar
-1 votes
1 answer
58 views

I need to join two RDDs as part of my programming assignment. The problem is that the first RDD is nested, while the other is flat. I tried different things, but nothing seemed to work. Is there any ...
Ahmed Sohail Aslam PhDCS 2025 's user avatar
3 votes
1 answer
129 views

I have two pandas series: right_series Index Value 1 0.1 2 0.2 3 0.3 6 0.6 7 0.7 left_series Index Value 1 0.1 5 0.5 10 1.0 I would like to join right_series on left_series by the indices, such that ...
Billy Pilgrim's user avatar
Advice
0 votes
2 replies
68 views

I have a query with join. When Trino has 10 workers it works. When 5 - it fails. As I understand the situation (Trino call this DistributedHashJoon) - it splits entire table into 10 pieces, so smaller ...
Cherry's user avatar
  • 34k
1 vote
1 answer
153 views

SELECT tt.trans_type_name AS transaction_type, trans.transaction_time, a.trans_action_name AS transaction_action_name, trans.transaction_notes FROM(SELECT Cast(...
Thomas A Mathew's user avatar
1 vote
1 answer
115 views

I'm trying to get partitioned tables from a postgres DB. Our partitions have the date in them in various formats which I'm extracting like this SELECT tab.relname AS table_name, (CASE ...
DatabaseShouter's user avatar
-1 votes
0 answers
41 views

I have a table/df that holds a set of code and value pairs. The codes are a mix of old (legacy) and new codes due to process changes. I have a second table/df that holds the old codes, new codes, ...
MikeB2019x's user avatar
  • 1,307
Best practices
1 vote
0 replies
76 views

Currently, we have a lot of code like this one to query data inside our repositories: database.suspendedTransaction { Items .selectAll() .where { Items.userId eq userId } ....
Nathan Fallet's user avatar
5 votes
4 answers
226 views

I have the following table definitions: Table public.messages: Column Type Collation Nullable Default ip text msg text ignore boolean Table public.host: Column Type Collation Nullable Default ip text ...
Andreas Weigl's user avatar
3 votes
0 answers
166 views

I noticed a significant performance deterioration when using polars dataframe join function after upgrading polars from 1.30.0 to 1.31.0. The code snippet is below: import polars as pl import time ...
Y. Gao's user avatar
  • 1,049
2 votes
1 answer
139 views

I have two Polars DataFrames (df1 and df2) with the same columns. I want to compare them by ID and Iname, and get the rows where any of the other columns (X, Y, Z) differ between the two. import ...
Simon's user avatar
  • 1,209
0 votes
7 answers
355 views

I need a single SQL query that would satisfy the below criteria. I have 2 tables, say Table1 with these values: ID Code Description 1 1000 abc 2 1000 pqr 3 1000 efg 4 2300 rst 5 2300 uvw 6 2930 xyz 7 ...
Amit Nerurkar's user avatar
2 votes
1 answer
67 views

I’m working with the DolphinDB Python API to analyze financial data, but I can’t join a table transformed by pivotby() with another table directly. The error says TablePivotBy has no merge attribute. ...
xiao feng's user avatar
0 votes
0 answers
52 views

I am trying to join two outlier tests, by attribute id, the outliers discovered from LOF_Outliers and the outliers discovered from Distance_Outliers. But only one of these two outliers is showing: ...
therickster's user avatar
2 votes
0 answers
90 views

I would like to join endpoints and return result (in Wordpress). After I get the results, I want to import with WP All Import plugin, Hotels and Locations. I'm using Traveler theme. The API is: https:/...
Steve Miller's user avatar
0 votes
0 answers
39 views

I'm trying to resolve an issue in Tableau Public where I'm trying to change string data to numerical data in a table, but the change won't stick. I'm trying to join two tables in Tableau based on the ...
Olivia_M's user avatar
2 votes
2 answers
129 views

dates = as.Date(c('2000-01-01','2000-02-01','2000-03-01','2000-04-01')) dt = data.table(date = dates[1:2], value = c(1,2)) > dt date value <Date> <num> 1: 2000-01-01 ...
jf328's user avatar
  • 7,431
0 votes
2 answers
141 views

I'm trying to merge two pandas DataFrames on multiple columns. It is a many-to-one relationship. There are many of the same values in df1 but only value in df2. These are the example DataFrames : df1 =...
thor's user avatar
  • 283
2 votes
1 answer
104 views

I have 4 tables in a mysql database: Results Result_ID Season_ID 1 1 2 1 4 2 4 2 … … 37 5 38 5 Players Player_ID | Player | Player_Type | Player_Order 1 Fred Defender-Left 1 2 ...
user31316051's user avatar
0 votes
0 answers
42 views

I have 2 queries with the same 3 related tables and each one works fine separately. But I would ideally like to combine them into one query. So this one: select me.id, me.title, me.start_date_time, ...
jeromio's user avatar
  • 94
2 votes
3 answers
146 views

I have two datasets (Each dataset around 1.8M rows), one contains per second data, and the other one sometimes have per second, every two second, or three second. I wanted to join these two datasets, ...
Mee's user avatar
  • 321
0 votes
0 answers
59 views

I'm trying to retrieve related equipment records from a test record using FetchXML in Dataverse. There is a many-to-many relationship between the test table and the equipment table. A join (intersect) ...
Shivam 's user avatar
1 vote
3 answers
122 views

I have the following query to pull the oldest batch we have shipped today: SELECT TO_CHAR(PT.CREATE_DATE_TIME, 'MM/DD/YY'), PT.ITEM_ID, MIN(PT.BATCH_NBR) FROM PIX_TRAN PT WHERE PT.TRAN_TYPE = ...
Inigo CA's user avatar
1 vote
1 answer
90 views

I have a large query that drives a business report - returns about 150k rows but has many steps. I am trying to join to a view that returns about 400k rows. The view has a material that equals my main ...
Blazer1984's user avatar
0 votes
2 answers
167 views

I have a select with a large joined table. On local, performance is fine, but on my server it takes much longer. Below are the version infos (I just upgraded to MariaDB 11.4 on the server). If I do an ...
Philipp M's user avatar
  • 3,558
0 votes
1 answer
83 views

I have a SELECT statement utilizing JOIN to combine two tables in MySQL. The query I'm attempting to complete is to combine the two tables, INSTRUCTOR and SECTION, and count the number of sections ...
Zachary Tucker's user avatar
0 votes
0 answers
75 views

I'm working with two Elasticsearch indexes -> accounts and contacts. These indexes are related in such a way that each account can be associated to contacts. However, not all contact data is ...
karan's user avatar
  • 1
0 votes
1 answer
43 views

I've been learning about metaprogramming in DolphinDB recently, and I want to use metaprogramming to generate asof join statement. But I couldn't find any examples of using metaprogramming to generate ...
Stella.W's user avatar
-1 votes
2 answers
79 views

I have 2 tables: DEPT: dept_no C N 1 200 100 2 300 150 3 400 200 and EMP: dept_no employee_no Task_status Salary 1 1 C 1 2 N 2 1 C 2 2 C with column Salary has to be calculated. Task status is C is ...
Sfdclearner's user avatar
1 vote
2 answers
95 views

Consider the following Tables Table A ID etc. 1 ... 2 ... Table B A_ID NAME etc. 1 A ... 1 B ... Table C A_ID NAME etc. 1 A ... 1 C ... Where etc. denotes some unrelated columns that need to be ...
KSa2's user avatar
  • 13
2 votes
3 answers
131 views

I have main query: SELECT mt.media_id, mt.title, SUM(DISTINCT sht.share) as share_count FROM $grouped_media_table mt LEFT JOIN $share_table sht ON sht.media_id = mt.media_id AND sht.title = mt....
Toniq's user avatar
  • 5,146
0 votes
0 answers
40 views

Environment OceanBase Community Edition 4.2.1 - MySQL mode,3 Availability Zones I'm evaluating OceanBase for a project that requires complex joins. A query that executes in 200ms on MySQL 5.7 takes ...
user avatar
1 vote
1 answer
68 views

I want to save the result of two joined dataframes in pyspak in a third, new dataframe. When I assigned the joined dfs to a variable, its class is NoneType, and what I need is a dataframe. mappedhh = ...
MariaT's user avatar
  • 147
0 votes
2 answers
67 views

I want to update the base pandas DataFrame with data from the update DataFrame. This applies to multiple rows of the base DataFrame (ie the merge features are not unique so can't be used as an index) ...
ciaran haines's user avatar
0 votes
1 answer
60 views

I am trying to understand why the behavior queries which logically only involve a primary key from one table perform a scan on a referenced foreign key in a joined table. Logically I see no reason ...
John Daschbach's user avatar
1 vote
2 answers
93 views

I have 3 tables in SQL: Agency, booking and checkin (and rooms) I need to compute a % of checkin / booking, by week number (of begin), by agency Here somes tables for example Agency : id name 1 first ...
Emmanuel's user avatar
4 votes
2 answers
102 views

I'm trying to execute a SQL query to transform some rows into columns. The problem: I have more rows at the end. Example: I have only one table in Postgres. id account category sub_category jsondata (...
user1829826's user avatar
-1 votes
3 answers
172 views

I'm encountering an issue with a LEFT JOIN in SQL that I can't quite figure out. I expect all records from my categories table to be returned, with NULLs for product columns where there's no matching ...
BRAD ZAP's user avatar
  • 117
1 vote
1 answer
62 views

I have two dataframes with timestamp data. It is sensor readouts from different sources. I want to combine them. The left dataframe (df1) can be quite large as it will be a combination of multiple ...
Enesma's user avatar
  • 11
0 votes
2 answers
74 views

I want only the persons who worked on the movie who has no entry for the movie (tconst) in the table "film_berufe_cross_tbl". my problem is when the person exists in the table "...
user30494802's user avatar
0 votes
3 answers
122 views

I'm guessing my question was asked before, but after hours of scouring, either I'm not able to figure out how the answers match my dilemma or it truly hasn't been asked (I'm guessing the former). So, ...
Jason Harrer's user avatar
0 votes
1 answer
72 views

I am trying to join two tables on muliple criteria, however the set of criteria would be different for each row. Then, in addition, I want to get a percentile rank for values from one column from one ...
Mikis's user avatar
  • 11
2 votes
1 answer
37 views

I have three dataframes A, B, and C. I need to join dataframes A and B on columns [a, b] and dataframes A and C on columns [a, c]. I would like to force Spark to only hash-partition the three ...
Justi's user avatar
  • 21
1 vote
1 answer
335 views

How do I keep both columns as the result of a Polars join with left_on and right_on, like in SQL? df1 = pl.DataFrame({"a": ["x","y","z"], "lk": [1,2,3]...
qwr's user avatar
  • 11.6k
0 votes
0 answers
19 views

In my database all tables have key Id. How should I join tables correctly? For example, right now I'm trying to join the Users and Companies tables like this: export class UserService<ServiceParams ...
Tomasz Wańkowicz's user avatar
-1 votes
2 answers
67 views

I'm trying to join a large fact table (~100M rows) to a dimension table (~500K rows) using 4 columns as composite keys. In the dimension table, each of the 4 join columns may contain the value 'ND', ...
Antoine's user avatar
  • 31
1 vote
2 answers
131 views

I am trying to fetch data from 4 tables related to article id. 4 tables are articles, authors, article_categories, category. Example data: Table - articles id content author_id 1 content is here 3 ...
Simon D's user avatar
  • 13

1
2 3 4 5
878