WITH cte_products AS (
select pack_size,b_code,p_name,nvl(totww-ttee,0) ssss,
RANK() OVER(ORDER BY nvl(totww-ttee,0) DESC) price_rank
from
(
select c.pack_size,b.b_code,c.p_name,nvl(sum(qty),0) totww, nvl(sum(rqty),0) ttee
from jpldba.INVOICE_MAST@fremote10g a, jpldba.INVOICE_CHILD@fremote10g b, jpldba.price@fremote10g c
where a.inv_no=b.inv_no
and b.b_code=c.b_code
and a.empcode='CTG169'
--and b.b_code='HSTS2'
and inv_date between '01-FEB-20' and '28-FEB-20'
group by c.pack_size,b.b_code,c.p_name
))
SELECT
pack_size,
b_code,
p_name,
ssss,
price_rank
FROM
cte_products
WHERE
price_rank <= 5
order by price_rank
/
Md. Quium Hossain who I'm Oracle DBA & APEX Developer. All-rounder in building small, medium, and enterprise applications. Extensive knowledge in various areas of web-driven applications in Back-end (PL/SQL, SQL, Java), Front-end (Oracle APEX, Oracle Forms, Oracle Reports, HTML, JavaScript, CSS, jQuery, OracleJET, ReactJS), RESTful APIs, Third-party library integrations (Apex Office Print (AOP), Payment Gateways, SMS, Syncfusion, HighCharts) and APEX Plugins (HighChart, StarRating)
Sunday, February 23, 2020
Subscribe to:
Post Comments (Atom)
How to install and configure Oracle Apex 24.1 with ORDS 22, Tomcat 9 and Jasper Report 7 on Oracle Linux 8.10
#########################Install Oracle APEX 24.1################################ ----------------------------------------------------...
-
# Report Column (only column): 1. Column Formatting > HTML Expression <span style="display:block; width: 200px"> #...
-
Installing Oracle Forms and Reports 12c on Windows 10 64 Bit. Hardware used for this installation is · Intel i3-2370M CPU · ...
-
when open forms builder then errors FRM-91129: fatal error: no value specified for required environment variable FORMS_BUILDER_CLASSPATH a...
-
---------------------------- | Keyboard Shortcut | ---------------------------- · Create: Breadcrumb Region Ctrl+/, C, B · ...
No comments:
Post a Comment