Question: I've been trying to use **styled-components** with the **alpha** version of **material-ui**

According to the [documentation](https://material-ui-1dab0.firebaseapp.com/customization/css-in-js), this should work out of the box.

This code:

```
const StyledButton = styled(Button)`
   color: red;
   text-transform: uppercase;
`;

return <StyledButton>Button</StyledButton>;

```

will generate something like this:

```
<button tabindex="0" class="MuiButtonBase-root-3177716317 sc-bdVaJa sxRGN" type="button" role="button">
...
</button>

```

It looks good. 

However, the only problem I have is **the order of the injected CSS styles** ([pic](https://i.stack.imgur.com/Uw1m3.png)). Styles from styled-components are injected before MUI's styles which make their priority lower.

Is there any way to solve this without using `!important`?

Answer: 
```
SELECT PRODUCTID, Productname, unitprice
FROM Products 
WHERE unitprice > (SELECT AVG(unitprice) FROM Products)

```
In almost any database, the best way is to use window functions;

```
SELECT PRODUCTID, Productname, unitprice
FROM (SELECT p.*, AVG(unitprice) OVER () as avg_up
      FROM Products p
     ) p
WHERE unitprice > avg_up;

```