How to show data from cms database in a layout?

Hi, i want to create a CMS monitoring layout which will have 4 regions and;
1st region will show the all layouts which are already playing in display group ( i think this will be available with playlist feature with V2)
2nd region will get data from cms database and show only names of logged in displays
3rd region will get data from cms database and show only names of ofline devices
4th region will get data from cms database and show total amount of display which are connected to cms.

how can i do that? i will be glad for any help to create sql commands. Kind regards.

And i also want to create another monitoring layout which will show all screenshot images from each display.Can it be possible? (this is another topic)

We are trying to find same solution. We would like to create status layout for all of our displays. Is there any way?