Update sql.markdown (#25925)

This commit is contained in:
boomam 2023-02-03 13:37:55 -05:00 committed by GitHub
parent 845e52bd1d
commit b77ca9421e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,7 +136,7 @@ Use `db_size` as column for value.
Change `table_schema="homeassistant"` to the name that you use as the database name, to ensure that your sensor will work properly.
```sql
SELECT table_schema "database", Round(Sum(data_length + index_length) / 1024, 1) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema;
SELECT table_schema "database", Round(Sum(data_length + index_length) / POWER(1024,2), 1) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema;
```
Use `value` as column for value.