You can translate the question and the replies:

Two Views Join

Hi Can some help me here below is my Queary , I aneed Denodo API SELECT account_number, suspended FROM i_crd_tpi_portfolio_accounts crd INNER JOIN (SELECT DISTINCT data_date FROM i_source_data_vestmark_csim_crd_direct_accounts WHERE data_date_data_timestamp_most_recent = 1) AS dd ON crd.data_date=dd.data_date INNER JOIN ( SELECT clientaccountnumber FROM i_source_data_vestmark_csim_crd_direct_accounts WHERE data_date_data_timestamp_most_recent = 1 AND lifecyclestep in ('Direct Suspended','Direct Pending Termination') AND upper(discretion) = 'MANAGER DISCRETIONARY' ) as an ON crd.account_number = an.clientaccountnumber ORDER BY account_number
user
19-03-2021 12:51:45 -0400

1 Answer

Hi, If I understand your question right, you are trying to create the join query as a view in Denodo and access it through an API. If so, I would follow the below steps: * First, create a derived view for the JOIN query using the VQL Statement as below, CREATE OR REPLACE VIEW AS . * Then, publish the derived view as a [Web service](https://community.denodo.com/docs/html/browse/latest/en//vdp/administration/publication_of_web_services/publication_of_web_services#publication-of-web-services) to get the view as an API. For information on creating Derived view using VQL, you could refer to the [Defining a Derived View](https://community.denodo.com/docs/html/browse/latest/en//vdp/vql/defining_a_derived_view/defining_a_derived_view) section of Virtual DataPort VQL Guide. Hope this helps!
Denodo Team
 Edited on: 23-03-2021 23:44:02 -0400
You must sign in to add an answer. If you do not have an account, you can register here