I have the following table structures:

table c\_alert:

```
|dynamic|symbol|price_usd|
--------------------------
|5      |BTC   |13000   |

```

table c\_current:

```
|symbol|price_usd|
------------------
|BTC   |13600   |

```

I have this query:

```
SELECT dbo.c_alert.symbol, dbo.c_alert.price_usd AS alert_price, dbo.c_current.price_usd AS current_price, (dbo.c_current.price_usd - dbo.c_alert.price_usd) * 100.0 / dbo.c_alert.price_usd AS pct_diff, dbo.c_alert.dynamic AS pct
FROM dbo.c_alert INNER JOIN
     dbo.c_current
     ON dbo.c_alert.symbol = dbo.c_current.symbol AND
        dbo.c_alert.dynamic > (dbo.c_current.price_usd - dbo.c_alert.price_usd) * 100.0 / dbo.c_alert.price_usd

```

Which returns this:

```
|symbol|alert_price|current_price|pct_diff|dynamic|
-----------------------------------------------
|BTC   |13000      |13613.3000   |4.7     |5   |

```

Not very strong with financial queries...Basically I would like to know when the price difference between alert\_price and current\_price are equal to or greater than value in the dynamic column as a boolean. So where the difference is equal or greater than 5% show True, else False. That dynamic value (integer) could change for each row in the c\_alert table. Hope someone can provide a solution to the query.