manish verma, thank you for posting this question here.
To query cost incurred for the subscription, you may use the Generate Cost Details Report API.
Note, for subscription level information, you will have to use
scope - as subscriptionId (ref: Understand and work with scopes)
and use the timePeriod in the request.
For more details, see Generate Cost Details Report - Create Operation
You can also use Exports API, if you need historical information - Tutorial: Seed a historical cost dataset with the Exports API
For details of getting data from REST API and saving to SQL, review the articles below:
Copy and transform data from and to a REST endpoint by using Azure Data Factory
Copy and transform data in Azure SQL Database by using Azure Data Factory or Azure Synapse Analytics
A tutorial video for Copying REST API data to Azure SQL DB using Azure Data Factory is also posted here - https://www.youtube.com/watch?v=k0Jsb-GUDSg
For any specific DataFactory related question, please feel free to post a new question with "Azure Data Factory" so that it can come to attention of data factory community too.
Hope this helps.