Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.
-- SQL Query 1:- with p as ( select TR.[Generic Code], TR.NDC, TR.[Drug Name], Sum(TR.[Dispensed Qty]) as Qty from TransactionReport TR Group By TR.[Generic Code], TR.NDC,TR.[Drug Name] ) select x.[Generic Code], x.NDC, x.[Drug Name], y.Qty from ( select p.*, row_number() over (partition by [Generic Code] order by Qty desc) rn from p ) x left join ( select [Generic Code], sum(Qty) Qty from p group by [Generic Code] ) y on x.[Generic Code]=y.[Generic Code] where rn=1; -- SQL Query 2 select Dr.GenericCode as [Generic Code],Br.NDC as [NDC],Dr.Name as [Drug Name],Br.Qty as [Qty] from BalanceReport Br Left Join Drug Dr on stuff(Dr.DrugNDCNbr,case when Dr.DrugNDCType in (50, 56) then 1 when Dr.DrugNDCType in (51, 57) then 6 when Dr.DrugNDCType = 52 then 10 end, 0, '0') = Br.NDC
|display data in text field from data base for updating||6||30|
|Why its difficult to Insert the Bit and date time value in sql Database||7||32|
|MSSQL Frequency of Years From Days Field||2||16|
|Join vs where||2||11|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
11 Experts available now in Live!