turbot/azure_insights

Query: sql_servers_for_sql_database

Usage

powerpipe query azure_insights.query.sql_servers_for_sql_database

SQL

select
lower(sv.id) as sql_server_id
from
azure_sql_database as db
left join azure_sql_server as sv on db.server_name = sv.name
where
lower(db.id) = $1
and db.subscription_id = split_part($1, '/', 3);