1
1
180Ringing2018-12-10 12:47:00
Algorithms
180Ringing, 2018-12-10 12:47:00

How to find the join condition (SQL)?

The input is a table t with one column.

f1
1
2
3
4
5
6
7
8
9

When combined with itself, we get
f1  f2
1   1
2   1
3   1
4   3
5   3
6   3
7   5
8   5
9   5

That is, f2 increases by 2 every 3 values ​​of f1
Question. How to find the condition of such a connection?
And what to read to be able to make such conditions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2018-12-10
@180Ringing

How to find the condition of such a connection?
Easily. f2 = int((f1-1)/3)*2+1
And what to read to be able to make such conditions?
School course of mathematics.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question