Skip to content

Credit Score

Nimish Agrawal edited this page Jan 12, 2020 · 2 revisions

Used to check the funneling of money from one account to another.

Inferences based on Dalal Street 2019

# Gives Number of times user sold the stock to the same user:

SELECT u.email, COUNT(u.email) FROM `OrderFills` t, `Bids` b, `Users` u, `Asks` a WHERE (t.bidId = b.id AND a.userId = 359 AND a.id = t.askId AND b.userID = u.id) GROUP BY u.email ORDER BY COUNT(u.email) DESC

+-----------------------------------------+----------------+
| email                                   | COUNT(u.email) |
+-----------------------------------------+----------------+
| [email protected]                     |             19 |
| [email protected]                |             19 |
| [email protected]               |             16 |
| [email protected]                 |             12 |
| [email protected]                        |             11 |
| [email protected]                      |             10 |
| [email protected]                     |             10 |
| [email protected]                   |              9 |
| [email protected]                   |              8 |
| [email protected]               |              8 |
| [email protected]                     |              8 |
| [email protected]                   |              8 |
| [email protected]                    |              7 |
| [email protected]                     |              6 |

Similarly Number of times he purchased from same mail.

+--------------------------------+----------------+
| email                          | COUNT(u.email) |
+--------------------------------+----------------+
| [email protected]            |             19 |
| [email protected]        |             18 |
| [email protected]          |             14 |
| [email protected]      |             12 |
| [email protected]             |             12 |
| [email protected]         |             11 |
| [email protected]               |             11 |
| [email protected]            |              9 |
| [email protected]            |              8 |
Clone this wiki locally