Skip to content

Commit 05760f3

Browse files
committed
sql_post_funding_fetch.sql
1 parent 6d95bc1 commit 05760f3

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

sql_queries/fetch_query_post.sql

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
\\land form
2+
3+
4+
5+
const query = `
6+
SELECT
7+
forms.farmer_name,
8+
forms.spouse,
9+
forms.mcode,
10+
forms.hamlet,
11+
forms.panchayat,
12+
form_lands.revenue,
13+
forms.district,
14+
forms.block,
15+
form_lands.p_contribution,
16+
form_lands.f_contribution,
17+
files.passbook_postfunding,
18+
form_lands.verified_by,
19+
form_lands.total_area
20+
FROM
21+
forms
22+
JOIN
23+
form_lands ON forms.id = form_lands.form_id
24+
JOIN
25+
files ON forms.id = files.form_id
26+
WHERE
27+
forms.form_type = 1
28+
AND forms.farmer_name = ?
29+
`;
30+
31+
32+
33+
\\plantation_form
34+
35+
36+
const query = `
37+
SELECT
38+
forms.farmer_name,
39+
forms.spouse,
40+
forms.mcode,
41+
forms.hamlet,
42+
forms.panchayat,
43+
plantation_details.revenue,
44+
forms.district,
45+
forms.block,
46+
plantation_details.p_contribution,
47+
plantation_details.f_contribution,
48+
files.passbook_postfunding,
49+
plantation_details.verified_by,
50+
plantation_details.total_area,
51+
plantation_details.plantaions,
52+
plantation_details.nos,
53+
plantation_details.price,
54+
plantation_details.other_exp,
55+
plantation_details.tot_nos,
56+
plantation_details.tot_price
57+
FROM
58+
forms
59+
JOIN
60+
plantation_details ON forms.id = plantation_details.form_id
61+
JOIN
62+
files ON forms.id = files.form_id
63+
WHERE
64+
forms.form_type = 3
65+
AND forms.farmer_name = ?
66+
`;
67+
68+
69+
\\farm_pond
70+
71+
const query = `
72+
SELECT
73+
forms.farmer_name,
74+
forms.spouse,
75+
forms.mcode,
76+
forms.hamlet,
77+
forms.panchayat,
78+
farm_pond_details.revenue,
79+
forms.district,
80+
forms.block,
81+
farm_pond_details.p_contribution,
82+
farm_pond_details.f_contribution,
83+
files.passbook_postfunding,
84+
farm_pond_details.verified_by,
85+
farm_pond_details.length,
86+
farm_pond_details.breadth,
87+
farm_pond_details.depth,
88+
farm_pond_details.volume,
89+
farm_pond_details.total_est
90+
FROM
91+
forms
92+
JOIN
93+
farm_pond_details ON forms.id = farm_pond_details.form_id
94+
JOIN
95+
files ON forms.id = files.form_id
96+
WHERE
97+
forms.form_type = 2
98+
AND forms.farmer_name = ?
99+
`;

0 commit comments

Comments
 (0)