23 questions
1
vote
0
answers
79
views
Nest Objects to be be nested one more level further in Dapper .NET API
I have completely working code, which returns the desired result.
var query = @$"SELECT
boats.*,
gallery.*,
textblock.*,
engine.*,
generator.*,
media.*
FROM {...
0
votes
1
answer
54
views
SQL: Joining results of two individual joins
This is an IIT question
I am trying to solve this problem. And I can individually do
(i)P LEFT JOIN Q ON P.A = Q.A AND P.B = Q.B
and
(ii) Q RIGHT JOIN R ON Q.A = R.A
But to JOIN the results of these ...
1
vote
3
answers
218
views
How to rename mutliples columns names (with prefix) according to respective dataframe name [R]
I have 15 dataframes, that I have merged together.
Here I'm loading my files.
data_files <- list.files() # Identify file names
for(i in 1:length(data_files)) { ...
0
votes
2
answers
227
views
Auto populate data of primary keys of different tables into another one table as foreign keys using JPA/Hibernate
Below is the expected table structure:
Users -> user_id (PK)
RoleA -> role_a_id (PK)
RoleB -> role_b_id (PK)
User_Roles -> user_id (FK), role_a_id (FK), role_a_id (FK)
Below are the ...
0
votes
1
answer
2k
views
Join/Merge Multiple Table with same column name
I want to join three tables respectively from the below SQLFiddle
http://sqlfiddle.com/#!9/5dd558/4
Now I want to create one table from this table based on date and Brand.
Like, I want data in this ...
0
votes
2
answers
131
views
How to get previous N rows for multiple joining rows
I am writing a SQL with Oracle Client 12 driver. I have two tables simplified as appended, and I want to get a table with following logic. The "B.TIME_B <= A0.TIME_A" seems created massive joining ...
0
votes
1
answer
3k
views
Problem with jpa criteriabuilder multiple joins
I have a table with 2 foreign keys. I need to create a query that aggregates results that use both foreign keys.
i.e. Table A "b_id" is a foreign key to Table B "id",
Table A "c_id" is a foreign key ...
-1
votes
1
answer
175
views
Multiple joins into the same table (TSQL) [duplicate]
I'm needing rows from the Employee table that have null values in OwnerID field and GMID field.
SELECT b.FirstName + space(1) + b.LastName AS OwnerName,
c.FirstName + space(1) + c....
0
votes
1
answer
2k
views
MySQL VIEW with morph type in where statement
I have the following tables:
Apps
id name
1 a
2 b
3 c
Parts
id name app_id
1 x 1
2 x 2
3 y 2
4 z 1
5 z 2
6 z 3
Settings
id name ...
0
votes
0
answers
453
views
Multiple select with same table join Vs Single cte table join with multiple select - Performance T-SQL
There are 3 tables that I need to Join with different filters.
EG:
Select 'First' as Header, *
from A join B on A.ID=B.ID
where A.Type=1 and B.Startdate>Getdate()
Union
Select 'Second' as ...
0
votes
1
answer
2k
views
Left join on 3 tables?
I have to use LEFT JOIN on 3 tables: UNITS, ROOMS_CHECK_IN and COMMENTS. Basically I want to show UNITS and for each unit count of rooms check in and count of comment. But I am getting same 4 digit ...
0
votes
1
answer
2k
views
How to prevent SQL multiple-join-rows error and apply values for multiple rows?
ERROR [HY000] ERROR: Update canceled: attempt to update a target row
with values from multiple join rows
Is there a way to avoid this error and update each row that contains E, despite having ...