Note: In Azure if we use premium database functions we can not downgrade those databases into standard pricing tier. We need to remove premium database features before downgrading to Standard tier.
I had to create multiple database copies to reproduce an issue where I don;t need premium database features. I end up deleting In-Memory tables before downgrading.
FYI: I was able to downgrade from P1 to S0 reduce the cost from 435$ a month to 15$ a month on X number of databases.
In-Memory tables is one of the premium database feature.
-- -- select schema_name(schema_id)+'.'+OBJECT_NAME(mt.object_id) TableName from sys.dm_db_xtp_table_memory_stats mt join sys.tables st on st.object_id = mt.Object_id where mt.object_id > 0 --