A
A
Andrey Balin2015-09-30 14:17:36
SQL
Andrey Balin, 2015-09-30 14:17:36

How to write an SQL query in which the condition would be fulfilled in Where: difference between balance accounts (40302-40301)>0?

There is a table of Accounts:
DateBal | Summ | Bal |
October 28, 2008 | 800 | 40302 |
October 28, 2008 | 500 | 40301 |
October 28, 2008 | 150 | 40303 |
Question: how to select BAL in one (or several) selects, for those where the condition is met:
(Summ(40302)-Summ(40301))>0

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Balin, 2015-09-30
@lod2007

The question is closed.
I do through Join of the table itself. To do this, I had to make a query on pl/|sql, where you can join tables.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question