Question: I have to place the same text on three different pictures that are placed into a bootstrap carousel. My issue is how to get this text responsive inside the carousel. Do you have any tricks?

EDITED

My question has been misunderstood. I mean I would have a block of text and get it to be responsive inside the carousel. For example A text at the center of the carousel in destkop have to remain at the center in the mobile

Answer: 
The value of `AVG(var)` is to be used in each expression to be summed, so you have to compute it separately with a subquery:

```
SELECT SUM((var-(SELECT AVG(var) FROM TableX))*
           (var-(SELECT AVG(var) FROM TableX)) ) / (COUNT(var)-1) AS Variance
FROM TableX

```
In partial response to CL's answer above, I am not sure whether the SELECT AVG(var) FROM TableX is cached or calculated twice (because it appears twice). For large tables/ views, this may become an issue. You may like an alternative:-

```
SELECT diff_squared / [n-1] FROM
(
    SELECT diff * diff AS diff_squared FROM 
    (
        SELECT x - mean AS diff FROM 
        (
            SELECT [Var] AS x FROM TableX
        ) innerData
        LEFT JOIN
        (
            SELECT avg(x) AS mean FROM
            (
                SELECT [Var] AS x FROM TableX
            ) 
        ) stats
    ) outerData
) LEFT JOIN
(
    SELECT count(x) - 1 AS [n-1] FROM 
    (
        SELECT [Var] AS x FROM TableX
    )   
) nMinus1

```