-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel.yaml
32 lines (30 loc) · 852 Bytes
/
model.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
tables:
- name: VENDOR_PRODUCT_PRICE
populate:
- by:
- VENDOR_PRODUCT_ID
orderby:
- column: START_DATE
order: DESC
queries:
- name: getProductPrice
parameters:
- name: startDate
type: date
query: |
select *
from VENDOR_PRODUCT_PRICE
where START_DATE >= :startDate
- name: GetProductQuoteHistory
parameters:
- name: vendorId
type: int
- name: productRef
type: string
query: |
select q.QUOTATION_ID, q.UPDATED_DATE, qi.PRICE, qi.MOQ, qi.NARRATIVE
from VENDOR_PRODUCT vp, CLIENT_QUOTATION_ITEM qi, CLIENT_QUOTATION q
where vp.VENDOR_ID = :vendorId
and vp.REFERENCE = :productRef
and vp.VENDOR_PRODUCT_ID = qi.VENDOR_PRODUCT_ID
and qi.QUOTATION_ID = q.QUOTATION_ID