G
G
GK5662018-01-25 22:02:38
SQL Server
GK566, 2018-01-25 22:02:38

How to group data based on another table?

Good day!
There was a task to group the data on the basis of other table.
Given 2 tables.
First (for each x, its pair of y is given):
5a6a277f7d503351664627.png
Second:
5a6a2b55095da868912179.png
In the end, you need to get the sum of Int by comparing/grouping x and y, as they are indicated in the first table. Moreover, there is not always a pair for x and y. That is, you need to get:
5a6a29800e239414583771.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question