LLMs to turn Ad Hoc Questions into Real-Time AnswersRegister

Skip to main content

MD_LIST_DIVES

Public Preview

Dives are currently in public preview and functionality is subject to change.

Lists all Dives in your MotherDuck account. Returns metadata for each Dive without the component content.

Syntax

SELECT * FROM MD_LIST_DIVES();
SELECT * FROM MD_LIST_DIVES("limit" =100, "offset" =0);

Parameters

ParameterTypeRequiredDescription
limitUINTEGERNoMaximum number of Dives to return
offsetUINTEGERNoNumber of Dives to skip
include_org_sharesBOOLEANNoInclude Dives shared with your organization. Defaults to false.
tip

limit and offset are reserved SQL keywords and must be double-quoted when used as named parameters.

Return Columns

ColumnTypeDescription
idUUIDUnique identifier of the Dive
titleVARCHARDive title
descriptionVARCHARDive description
owner_idUUIDUUID of the Dive owner
current_versionINTEGERLatest version number (1-based)
created_atTIMESTAMP WITH TIME ZONEWhen the Dive was created
updated_atTIMESTAMP WITH TIME ZONEWhen the Dive was last updated
owner_nameVARCHARName of the Dive owner

Examples

List all Dives:

SELECT * FROM MD_LIST_DIVES();

List the 10 most recently updated Dives:

SELECT id, title, owner_name, updated_at
FROM MD_LIST_DIVES()
ORDER BY updated_at DESC
LIMIT 10;

Paginate through Dives:

SELECT * FROM MD_LIST_DIVES("limit" =20, "offset" =0);  -- first page
SELECT * FROM MD_LIST_DIVES("limit" =20, "offset" =20); -- second page