I have the below query that pulls the number of calls by hour today, what i would like to do is pull the data for the last 10 days, but have each day represented as a column and then it show null or 0 if no data for that interval.
I need to use the query in ORACLE SQL DEVELOPER
select to_char(startdate, 'hh24'), count(*) as totalcalls
where startdate >= TRUNC(SYSDATE) - 1/86400
group by to_char(startdate, 'hh24')
order by to_char(startdate, 'hh24');
I would like data to be represented like this
HR - Then a column for previous 10 days.
7 11 12 22 35 16 12
It would perhaps be more conventional (and more flexible) to have hours as columns and dates as rows because the hours in a day is a fixed number. However you can use conditional aggregates for what you
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
Truncate is a DDL Command where as Delete is a DML Command.
Both will delete data from table, but what is the difference between these below statements
truncate table <table_name> ??
delete from <table_name> ??
The first command cannot be …
Cursors in Oracle:
A cursor is used to process individual rows returned by database system for a query.
In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to copy a database user from one database to another user DBMS_METADATA. It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines