sql - Filter records in Mysql -


i have mysql table follows

buyer   seller  qty price          b    100 4.2          b    200 4.3          c    50  4.2 w          q    10  4.5 b             150 4.4 b             100 4.55 b             50  4.6 b          c    10  4.3          q    40  4 f          m    20  4.25 l          b    30  4.50 

table contains trading information of stock. here can see there connection between , b. of time buys stock b , @ each trade increase price slightly. in same way b buys same amount later higher price. need filter out such connection select statement. how can select statement.

i need filter out following results. show continuous relationship between , b. sample table, actual table contains more 10,000 history trades of clients given column names

buyer   seller  qty price          b    100 4.2          b    200 4.3          c    50  4.2 b             150 4.4 b             100 4.55 b             50  4.6 

a , b hypothetical values need show similar relationships 10,000 records. not , b of other buyers , sellers

could simple as:

select * tablename (buyer = 'a' , seller = 'b') or (buyer = 'b' , seller = 'a') 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

How do you convert a timestamp into a datetime in python with the correct timezone? -