Quantum Internet Benefits

Image
  The quantum internet is a network of quantum computers that are connected together using quantum communication. It has the potential to revolutionize many industries, including: Secure communications: The quantum internet would be inherently secure, as it would be impossible to eavesdrop on quantum communications without being detected. This could be used for applications such as secure financial transactions, government communications, and military applications. Quantum computing: The quantum internet would allow quantum computers to be connected together, which would allow them to solve problems that are currently impossible for classical computers. This could be used for applications such as drug discovery, financial modeling, artificial intelligence, and materials science. Quantum sensors: The quantum internet could be used to connect quantum sensors together, which would allow them to create a global network of sensors that could be used to monitor the environment, detect earthq

Building Complex Sql queries using group by, having, Rank and top functions

 Sql Query with Where clause


select

ProductSubcategoryID, size, StandardCost, ListPrice, class, style

from 

Production.Product

where

ProductSubcategoryID is not null and 

size is not null and

StandardCost <> 0.00 and 

ListPrice <> 0.00 and 

class is not null and 

style is not null


   -- Complex SQL query with where, group by, having clauses and top, rank, dense_rank, row functions

select
Top 20
ProductSubcategoryID, 
Max(StandardCost) as MaximumStdCost, 
Max(ListPrice) as MaxListPrice,
Max(ListPrice) - Max(StandardCost) as MaxDifferenceStandardFin,
Max(ListPrice) / Max(StandardCost) as CostPriceRatio,
Rank() over( Order by(Max(ListPrice) / Max(StandardCost)) Desc) as DistinctRankMaximumCostPriceRatio,
Row_Number() over( Order by(Max(ListPrice) / Max(StandardCost)) Desc) as RankMaximumCostPriceRatio,
DENSE_RANK() over( Order by(Max(ListPrice) / Max(StandardCost)) Desc) as DistinctRankwithNextSequence
from 
Production.Product
where
ProductSubcategoryID is not null and
StandardCost <> 0.00 and 
ListPrice <> 0.00
Group by 
ProductSubcategoryID
having 
Max(ListPrice) / Max(StandardCost) > 2.2
order by
Max(ListPrice) / Max(StandardCost) desc
Watch the below video for more details



Comments

Popular posts from this blog

Jsp / Java Password Encrypt and Decrypt Example

SQL Script : Adventure works database setup and Select query, list of tables #100daysofsql

How to Hide Gridview and Show the selected gridview row details in Form View using ASP.NET C#