{"id":1477555,"date":"2018-03-13T08:08:55","date_gmt":"2018-03-13T15:08:55","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/"},"modified":"2018-03-13T08:08:55","modified_gmt":"2018-03-13T15:08:55","slug":"is-there-any-sql-documentation-available","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/","title":{"rendered":"Is there any SQL documentation available?"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I have been tasked with putting together some SQL statements that can be called on-demand to display information from the database such as:<\/p>\n<ul>\n<li>List of customers who have not bought a ticket for 3 months<\/li>\n<li>Top 15 customers with most bookings the last 3 months<\/li>\n<li>etc etc<\/li>\n<\/ul>\n<p>I figured if I could see any of the SQL used by The Event Calendar or ticket plugins when displaying lists on the backend of WordPress then it would save me loads of time working out the relationship between wp_posts, postmeta for customer and event data etc. I&#8217;ve had a look but I can&#8217;t see any documentation anywhere &#8211; is this kind of information available anywhere?<\/p>\n<p>Many thanks.<\/p>\n","protected":false},"template":"","class_list":["post-1477555","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Is there any SQL documentation available? -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Is there any SQL documentation available? -\" \/>\n<meta property=\"og:description\" content=\"Hi, I have been tasked with putting together some SQL statements that can be called on-demand to display information from the database such as: List of customers who have not bought a ticket for 3 months Top 15 customers with most bookings the last 3 months etc etc I figured if I could see any [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/\",\"name\":\"Is there any SQL documentation available? -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-03-13T15:08:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Is there any SQL documentation available?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Is there any SQL documentation available? -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/","og_locale":"en_US","og_type":"article","og_title":"Is there any SQL documentation available? -","og_description":"Hi, I have been tasked with putting together some SQL statements that can be called on-demand to display information from the database such as: List of customers who have not bought a ticket for 3 months Top 15 customers with most bookings the last 3 months etc etc I figured if I could see any [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/","name":"Is there any SQL documentation available? -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-03-13T15:08:55+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/is-there-any-sql-documentation-available\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"Is there any SQL documentation available?"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1477555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1477555\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1477555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}