Example of component menu item xml to pull data from db with sql option
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="Leisure Map" option="com_leisure_map_default_option">
<message>
Show leisure centres on a google map.
</message>
<fields name="request">
<fieldset name="request">
<field name="centre" type="sql" label="COM_LEISURE_CENTRE" description="" query="SELECT id, title FROM #__leisure_centre" key_field="id" value_field="title">
<option value="0">COM_LEISURE_SELECT_CENTRE</option>
</field>
</fieldset>
</fields>
</layout>
</metadata>