Select data from date range between two dates

0 votes

I have a database called Product Sales that contains the following data.

Product_ID | Sold_by | Qty | From_date  | To_date
-----------+---------+-----+------------+-----------
3          | 12      | 7   | 2013-01-05 | 2013-01-07
6          | 22      | 14  | 2013-01-06 | 2013-01-10
8          | 11      | 9   | 2013-02-05 | 2013-02-11

Now what is the query if I want to select sales data between two dates from a date range?

For example, I want to select sales data from 2013-01-03 to 2013-01-09.

Sep 2, 2022 in Database by Kithuzzz
• 38,010 points
668 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
0 answers

SQL query to select data between two dates and times

My table contains a [time] field that ...READ MORE

Aug 25, 2022 in Database by Kithuzzz
• 38,010 points
1,981 views
0 votes
1 answer

Excel - count days in each month between two dates (both dates available)

Anyway, here's an alternative completeness approach based ...READ MORE

answered Apr 11, 2022 in Database by gaurav
• 23,260 points
2,052 views
+2 votes
1 answer

How to export data from MySql to a CSV file?

If you are using MySql workbench then ...READ MORE

answered Jan 4, 2019 in Database by Priyaj
• 58,090 points
1,210 views
0 votes
1 answer

What is the best way to fetch data from table?

Hey Shraddha, I understand your doubts about fetching ...READ MORE

answered May 25, 2019 in Database by sampriti
• 1,120 points
1,770 views
0 votes
1 answer

How can Mysql database sync between two databases?

Hii, Some simple rules you will have to ...READ MORE

answered May 4, 2020 in Database by Niroj
• 82,880 points
1,869 views
0 votes
2 answers

How to send data to my database from html and css Contact Us Form?

Hello @Sign, It is simple to create contact ...READ MORE

answered Aug 4, 2020 in Database by Niroj
• 82,880 points
35,005 views
0 votes
1 answer

Difference between datetime and timestamp in sqlserver?

Timestamp is a synonym for rowversion, according ...READ MORE

answered Feb 16, 2022 in Database by Vaani
• 7,020 points
4,285 views
0 votes
1 answer

How to convert DateTime to VarChar

With Microsoft Sql Server: -- -- Create test case -- DECLARE ...READ MORE

answered Feb 23, 2022 in Database by Neha
• 9,060 points
838 views
0 votes
0 answers

How to convert java.util.Date to java.sql.Date?

I need a java.sql since I'm trying ...READ MORE

Aug 11, 2022 in Database by Kithuzzz
• 38,010 points
494 views
0 votes
0 answers

Get week day name from a given month, day and year individually in SQL Server

I'm attempting to get a day name ...READ MORE

Aug 13, 2022 in Database by Kithuzzz
• 38,010 points
962 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP