select dp.report_id
from data_point dp
join aspect a on dp.aspect_id = a.aspect_id
join entity_identifier ei on dp.entity_identifier_id = ei.entity_identifier_id
where a.aspect_id in (
select a.aspect_id from aspect a where a.name = 'DocumentType'
)
and
dp.value in ('10-Q')
and
ei.scheme='http://www.sec.gov/CIK' and ei.identifier='0001652044'
--- The result of above sql is:
47009378
88639810
123898394
---------------------------------------------------------------------------------------------------
Then I run the following sql to get aspect_id of AssetsCurrent:
------
select a.aspect_id,a.*
from aspect a
where a.name in ('AssetsCurrent')
--- The result of above sql is:
123480
16407
25328645
---------------------------------------------------------------------------------------------------
Then I can get all Current Assets of Alphabet from 10-Q report.
select p.end_date,dp.value
from data_point dp join period p on dp.period_id = p.period_id
where
dp.report_id in (
47009378,88639810,123898394 -- the result from first sql
)
and
dp.aspect_id in (
123480,16407,25328645 -- the result from second sql
)
---------------------------------------------------------------------------------------------------
But I found different company assets may include different sub items.
For Tesla:
Assets = LiabilitiesAndStockholdersEquity = AssetsCurrent + PropertySubjectToOrAvailableForOperatingLeaseNet + tsla_LeasedAssetsNet + PropertyPlantAndEquipmentNet + OperatingLeaseRightOfUseAsset + IntangibleAssetsNetExcludingGoodwill + Goodwill + LongTermAccountsNotesAndLoansReceivableNetNoncurrent + RestrictedCashNoncurrent + OtherAssetsNoncurrent
I want to get all those sub items for Assets, Or I want to get all items of Consolidated Balance Sheets.
How do I know which aspect ids are part of Consolidated Balance Sheets? which aspect ids are part of Assets ?
Thanks.
Arden