Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the JDBC query for the below SQL string , sqlQuery = SELECT * FROM products where created_date > '2020-06-13' and created_date < '2022-07-13' group

Consider the JDBC query for the below SQL string ,

sqlQuery = "SELECT * FROM products where created_date > '2020-06-13' and created_date < '2022-07-13' group by company_id, lq_product" ;

1. Here , write a JDBC query for the created_date > one month back and created_date < today and current time, using the logic given below:

String startDate = Some date util logic giving back date ; // write here the logic for start date to be one month back String endDate = Some date util logic giving current date/time // write here the logic for end date to be current date // And finally the query to be sqlQuery = "SELECT * FROM products where created_date > '+"startDate"+' and created_date < '+"endDate"+' group by company_id, lq_product" ;

2. give the output screenshot of java and also ensure that it works with mysql

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions

Question

3. Evaluate your listeners and tailor your speech to them

Answered: 1 week ago