返回首页
We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [join]

A JOIN is a general operation in relational algebra for a combining operation on two or more relations in a relational database system. JOIN is also keyword of the SQL language for performing this operation.

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Issue creating a single query

I'm having a bit of difficulty creating a single query. From the CUSTOMER table (see attachment below), I need to write a single query that will display a count of how many customers are active and ...
0
votes
0answers
11 views

Jpa specification, join and Many To Many

Context: I have an entity Alert that contains multiples Dangers and Danger can be linked to multiple Alerts (standard Many To Many) @Entity @Table(name = "alert") @Cache(usage = ...
0
votes
2answers
27 views

SQL Update each row based on value from other

I need to do update, but for each row different value. I have sql like: select c.id as client_id, c.name as c_name, st.id as st_id, st.name as st_name, c.default_store_type_id from client c join ...
0
votes
0answers
17 views

Join Function used to match value of field in one table with other table

I am trying to display field values, when values of field in the table matches with the values in field of another table. Its like I am creating a drop down fields. Here basis the car Model dropdown. ...
0
votes
0answers
7 views

I want to fuzzy join two huge datasets on Elasticsearch for example below. The tolerance is 90% match. Is it possible? If yes, how?

Table 1 : Industry Name : Aashrith Pvt. Sols. , Desrop Energy Solutions Industry Type : Agriculture , Mining Table 2: Industry Name : ashrith pvt. sol I ...
0
votes
0answers
27 views

N level managerName (Director name) using managerID for an employee [duplicate]

I have a table Employee with EmployeeID, Name, ManagerID(references EmployeeID) and RoleID I need to find the Direction name who is manager of manager, manager of manager of... till root user (who ...
0
votes
3answers
40 views

Counting all distinct rows, and then join with another table

Every day I check a log file with all information from several wireless networks. I have made a small C#/SQLite app that imports the log file into a database. I then select (and count) all ...
0
votes
2answers
49 views

How can I insert multiple values into a list? (python)

In Python, I want to add a space to each string in the list. The result is irrelevant whether it is a string or a list. But I would like to get the number of all cases where there can be spaces in the ...
0
votes
1answer
20 views

SQL - left join table to itself

In short, want to left join table to itself, but only rows that have id 1 or 2 Table: id f1 1 a 1 b 2 a 3 a expected result 1 2 a a 1 2 b null does not work: select t1.id,t2.id, t1.f1,t2....
1
vote
1answer
38 views

Sum of column breaking in group by of three-table join

I am having a problem with a three-table join where the sum of a field gets broken when I add a field from the third table in the group by clause: -- First join returns 100 rows which are all the ...
1
vote
0answers
43 views

oracle join creating duplicate records

My query giving duplicate records. I want all the records in trip_checkpoint_event table and the corresponding values from other table. trip_hdr is my main table trip_dtl_assign is my details table ...
0
votes
1answer
10 views

How to only join on numeric values

Right now I have: select a.id b.colone b.coltwo from tablea a left join tableb b on b.id = a.id I'm getting the "numeric value not recognized" error because one value from b.id is not ...
0
votes
2answers
27 views

Having trouble with MySQL joins

artists table: Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | ...
0
votes
2answers
21 views

Oracle SQL code to list a persons employment events and another 2 columns devoted listing the prior event and date

So I have a database full of people with employment events and I'm trying to build a report in SQL that will pull the following: Name, employment event, date of employment event, and the employment ...
-2
votes
0answers
22 views

I want get all the publications with their users correct

const Publication = sequelize.define('publications', { idpublication: { type: Sequelize.INTEGER, primaryKey: true }, namepublication: { type: Sequelize.TEXT }, descriptpublication: { ...
0
votes
1answer
33 views

MySQL query join on max value

Slimmed down example of my query; SELECT ce.*, cev.* FROM calendar_event ce INNER JOIN calendar_event_viewing cev on ce.calendar_event_id = cev.calendar_event_viewing_calendar_event_id AND ...
1
vote
1answer
48 views

Pandas Join not providing the exact results

I have two dataframes df1 and df2. I want to join all columns to df1 with 2 columns from df2. print(df1.shape[0]) # 344 print(df2.shape[0]) # 3577 df3 = pd.merge(df1, df2[['latitude', 'longitude', '...
0
votes
1answer
16 views

mysql update statement using 3 tables

I am developing a database on online quiz management one table stdinfo stores usernames and student details table testinfo stores the testid name subjects and their marking schemes(separate for each ...
0
votes
1answer
24 views

Finding couples of occurrences - Postgresql

I need to find possible couplings of employees and department that they worked for. I need to include only the couplings of 2 different departments, so if an employee worked for more than 2 ...
0
votes
1answer
36 views

Having issues writing query with multiple joins

I'm trying to write a query that will display the customer id, first name, last name, and return date. I need to figure out who was the last person who rented the movie. I know I need to pay close ...
1
vote
1answer
34 views

SQL Select or join two separate subsets of a table

Say I have a table Element in my SQL Server database with, we'll suppose, nothing other than an Id column. I also have tables Foo and Bar, which each have a many-to-many relationship with Element, ...
0
votes
1answer
17 views

Join user-defined table type param to view

SQL Server 2012: I have a stored procedure with a parameter of user-defined table-type. To create its return rowset, the stored procedure selects from a view joined to the param table on a few ...
0
votes
1answer
39 views

MySQL get two rows from a table in one join

I have 3 tables: Trip | id | name | __________________ | 2 | X | | 3 | Y | | 4 | Z | Tourist | id | name | __________________ | 1 | John | | 2 | ...
0
votes
2answers
25 views

Extract the difference between two Strings

I'm looking to extract the difference between two cells containing strings in Google sheets. I've tried to use the search, split and regexextract formulas with no luck. Cell A1; - "IE, DE, FR, GB, ...
-3
votes
0answers
33 views

R - how to merge between 2 data frames on common values

I have 2 datasets I am trying to combine. 1 is a dataset with lab submissions with a postcode (amongst other data) from round the UK. there are about 4000 submissions. I have a second coordinates ...
-1
votes
0answers
27 views

mapping of areas with multiple users

I have areas like sector 1, sector 1 a, sector 1 b, sector 1 c and multiple cable operators who are working in either full sector(i.e sector 1) or any of the sub sectors. I have created table of cable ...
2
votes
0answers
30 views

How to create Criteria Builder query for joining three tables having One to One and Many to One entity relationship?

I want to create a criteria builder query for joining three tables. I've looked into internet but all the examples of three tables join have a different relationship than I want. So I have three ...
0
votes
2answers
41 views

How to inner join two tables using DATE clause in DB2

SELECT d.local_reference_no FROM emcs_ct.t_draft_movement_snapshot d INNER JOIN emcs_ct.t_movement_snapshot M ON M.local_reference_no = d.local_reference_no WHERE created_date > '2019-06-...
0
votes
1answer
26 views

JOIN on django orm

1. 1.1. query: QuestionRequestAnswerModel.objects.filter(request_no__exact=index['id']).select_related('answer_user').values('answer_user', 'amount', 'select_yn') 2. 2.1. query: ...
1
vote
2answers
40 views

Pandas joining dataframes with different intervals in matching columns

I'm a bit confused as to how to even formulate the question properly. I have two Pandas dataframes: data = {'ID':['A1','A1','A2','A2','A2'], 'FROM':[0,2,0,2,4], 'TO':[2,4,2,4,6], 'PYR' : [0.25,0.11,0....
0
votes
1answer
20 views

I get an typerror when plotting a dataframe

I am just beginning to use pandas and struggling with very basic functions. I have a dataset that contains ticket information. I am able to do some basic computing like get count of total tickets, ...
0
votes
0answers
25 views

featuring comment authors and news writers. sql

I have a problem displaying news writers and comment writers, what happens between news writers and comment writers is the same value, it should be different, help me solve this problem select a....
-2
votes
1answer
62 views

Join-Object two different csv files using PowerShell

The first .csv file is an monthly backup size in KB on based client name. The second .csv file is an next monthly backup size in KB on based client name. It lists all the Client Name in column A. ...
1
vote
2answers
29 views

Bigquery Innerjoin is running for very long time

I have two tables of size 13 GB and 1 GB. Table 1 has 12 Million rows * 1.6k columns and table two has 5k rows * 160 columns. I am performing an inner join on these two tables to find all the matching ...
2
votes
3answers
49 views

Join multiple tables dynamically

The problem Hi all, I am trying to join a few dataframes together dynamically. For me that means that I have a dataframe that I start with df_A, to which I want to join multiple other ...
0
votes
1answer
58 views

join a string vector in rust

I want to join a string vector into a String, but I got confused on the different result of vector of &str &String String: let v1: Vec<String> = vec!["foo".to_string(), "bar".to_string()...
1
vote
3answers
35 views

How to join table with both equal and Not equal on same column

I have two tables as below TableA: id Country ---------- 1 US ---------- 2 SG ---------- 3 EU ---------- 4 IN TableB: Report country ---------------- No NOT US ----------...
0
votes
1answer
34 views

Oracle SQL Joins: List the book(id, title, and cost) and author(id, name) info for all books in the collection. [42 rows]

List the book(id, title, and cost) and author(id, name) info for all books in the collection. [42 rows total] (In this problem set, use the WHERE clause to form the equi-joins) Oracle 9i server (YES ...
0
votes
1answer
42 views

SQL Filtering when joining

bit of a novice question, I am running a query and left joining and wanted to know whether there was a difference when you specify a filter in terms of performance, in e.g below, top I filter straight ...
1
vote
2answers
37 views

UPDATE Statement for latitude and longitude based on address in the same table

I am trying to load 20k addresses into a table where I geocode the user based on their address. Problem is there are already 200k of addresses we have already geocoded and I would like to just grab ...
0
votes
1answer
36 views

How to return columns and counts in SQL?

This is the question I am trying to solve. Also what I got so far, only problem is that only displays the mem_num and counts, I need to display the member's first and last name, which are in 2 ...
0
votes
1answer
26 views

How to return comma delimited string from array, in React Native

I have an array and I want to extract a specific column's values and return the items in a comma-delimited string. What is the best way to go about this? For the below array I would like to get the ...
-2
votes
0answers
19 views

How to understand different between left join and join in SQL? [duplicate]

Why the query with JOIN does not display rows with NULL values select u.user_firstname, u.user_lastname, o.order_title from users u join orders o on u.user_id=o.user_id Join result But the query ...
1
vote
0answers
11 views

PSQL problem joining multiple tables (MIMIC II database)

I have a patients database with multiple tables, and I need to join specific columns (pre-processed) from different tables in a results table. Here's how I do it: SELECT d_patients.subject_id, ...
0
votes
1answer
40 views

Group By using all column from left table after join with replicated names in pyspark data frame

I have a Spark DataFrame obtained by joining two table. They share the column "name valuesA = [('A',1,5),('B',7,12),('C',3,6),('D',4,9)] TableA = spark.createDataFrame(valuesA,['name','id', '...
1
vote
1answer
30 views

sqlite3 How to change a field conditionally in a joined table (using CASE..END together with JOIN)?

I have two tables "object" and list" joined by: $cmd="SELECT * FROM object LEFT JOIN list ON (object.id=list.imgref AND list.persoon={$_SESSION['id']})" ." WHERE (owner=0 OR owner={$_SESSION['id'...
3
votes
1answer
97 views
+50

Filling with Values from Following Date in DB upon Join

I effectively need to fill entries that don't exist with the next available data in the archive. Background: So I've got a record where it has archived each status per month. However it only updates ...
0
votes
2answers
36 views

Node js query multiple collections in Firestore

I want to join 2 collections in Cloud Firestore database. How to implement it using Node.js?
-1
votes
1answer
21 views

Im running this code on sql oracle ,but i got error“ sql command not properly ended”.MY 1st table is emply and second table is department, [duplicate]

UPDATE emply SET e_age = e_age + 10 FROM emply JOIN department ON emply.e_dept = department.d_dpt;
-1
votes
1answer
28 views

Covert left join to simple join

My LEFT JOIN subquery is taking longer. How do I covert it to JOIN? SELECT * FROM "TABLE_A" LEFT OUTER JOIN TABLE_B ON TABLE_A.mainid = TABLE_B.secondID LEFT JOIN ( ...

返回首页
杏彩计划 杏彩官网 杏彩APP 杏彩走势图 杏彩下载 杏彩官方 杏彩网站 杏彩怎么玩 杏彩官方 杏彩靠谱吗 杏彩代理 杏彩骗局 杏彩投注 杏彩倍率 杏彩开奖 杏彩漏洞