How to get total count of orders placed on spesific date using Raw query [closed] - sql

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have ORDER Table in which I am saving Orders date wise.
Now I want total number of orders placed on specific date
How to do that
Pls Help...

Try this:-
SELECT COUNT(*)
FROM TABLE_NAME
WHERE DATE_COL = 'YOUR_DATE'

Related

like i having table1 in that amount column is there but how much amount is there in that column i dont know to display top 10 high amounts [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
like i having table 1 in that amount column is there but how much amount is there in that column i dont know to display top 10 high amounts using sql
As the question misses some details,
SELECT TOP 10 Amounts FROM India_Base
ORDER BY AMOUNTS DESC

How to update only the year of the date column in a table - sql oracle [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I was looking for the query which can update only the year of the date column to 2019.
yes you can,
if the field of the date for you mydate from table_name, you can do:
Update table_name
set column_name = Add_months(sysdate, -(extract(year from sysdate)-extract(year from mydate))*12)
where <where_condition>;

SQL Server : Show The Latest Record DATE AND TIME [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Here it is, I already use two queries but it doesn't seems to work the right way, I should view the latest PREV_BAL "5490"
in you query use order by desc for both columns
row_number() over(partition by tenant_id order by date desc ,time_p desc) rn

Write a query that select all events ordered by a particular customer in SQL [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
In SQL how we will write a query that selects all events ordered by a particular customer. Kindly help me there.
Thanks
The table's name is events?...
Select * from events order by custumers asc
if not
select events from Table order by custumers asc

Problems with SQL query finding three names with the most records [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a table and I want to display the 3 names (Ted, Ringo, Paul) that have the most records using an SQL query.
It's a primitive question, but please help me.
my table:
SELECT TOP 3 Name
FROM YourTable
GROUP BY Name
ORDER BY COUNT(*) DESC