当前位置:网站首页>Bi-sql distinct
Bi-sql distinct
2022-06-24 04:47:00 【Powerbi white tea】
DISTINCT function
stay SQL in ,DISTINCT Function is also one of the common functions , It can usually be used to de duplicate tables or columns .
Its purpose and PowerBI-DAX Function DISTINCT Functions are similar , You can de duplicate tables or columns .
Basic grammar
grammar 1:
SELECT DISTINCT Column name FROM The name of the table
grammar 2:
SELECT DISTINCT * FROM The name of the table
notes : Usually ,SQL Data warehouse is very strict for data storage , Each row of data has a corresponding primary key ( The unique identifier ),DISTINCT It mainly solves the problems similar to the extraction of unique information .
Using examples
Case data 1:
In the native database of white tea , There is a name “TEST” The database of , Its name is “Distinct” Analog data sheet for , My friends can clearly see A01 The data in this row is repeated .
Example 1:
Import the entire table to PowerBI in .
SELECT
DISTINCT
*
FROM
[Distinct]give the result as follows :
about A01 The repeated projects of are successfully removed , Redundant lines are removed .
Case data 2:
In the native database of white tea , There is a name “TEST” The database of , Its name is “ Sales details ” Analog data sheet for .
Example 2:
Re import the branch to PowerBI in .
SELECT
DISTINCT
The branch where you are
FROM
Sales details give the result as follows :
Successful de duplication of the branch column .
Example 3:
Re import the product name and the branch combination to PowerBI in .
SELECT
DISTINCT
Name of commodity ,
The branch where you are
FROM
Sales details give the result as follows :
This is white tea , One PowerBI Beginners .
边栏推荐
- Web penetration test - 5. Brute force cracking vulnerability - (5) SMB password cracking
- Idea创建Servlet 后访问报404问题
- Popularization of children's programming education in specific scenarios
- 事件
- Library management backstage
- 『应急响应实践』LogParser日志分析实践
- Introduction to gradient descent method - black horse programmer machine learning handout
- Activity recommendation | cloud native community meetup phase VII Shenzhen station begins to sign up!
- 编译器是如何将芯片执行的第一个指令放到芯片起始地址的?
- 梯度下降法介绍-黑马程序员机器学习讲义
猜你喜欢

Introduction à la méthode de descente par Gradient - document d'apprentissage automatique pour les programmeurs de chevaux noirs
Advanced authentication of uni app [Day12]

解析后人类时代类人机器人的优越性

Introduction to the "penetration foundation" cobalt strike Foundation_ Cobalt strike linkage msfconsole

2022年二级造价工程师备考攻略,你准备好了吗?

梯度下降法介绍-黑马程序员机器学习讲义

Abnova membrane protein lipoprotein solution

『应急响应实践』LogParser日志分析实践

SAP MTS/ATO/MTO/ETO专题之八:ATO模式2 D+空模式策略用85

让孩子们学习Steam 教育的应用精髓
随机推荐
IP and traffic reconciliation tool networktrafficview
How does ECS build websites? Is it troublesome for ECs to build websites?
Facebook internal announcement: instant messaging will be re integrated
Worthington木瓜蛋白酶化学性质和特异性
Advantages of fixed assets management system
What is an evpn switch?
Facebook内部通告:将重新整合即时通讯功能
How to build an ECS and how to control the server through the local host
How does the VPS server upload data? Is the VPS server free to use?
Abnova peptide design and synthesis solutions
胶原蛋白酶——Worthington四种类型的粗胶原酶
Introduction to gradient descent method - black horse programmer machine learning handout
[2021 "shadow seeking" medical artificial intelligence algorithm competition] Ti-One product use tutorial
Detailed explanation of tcpip protocol
一文简述:供应链攻击知多少
事件
How does ECS select bandwidth? What types of servers do you usually have?
mini-Web框架:装饰器方式的添加路由 | 黑马程序员
The trunk warehouse can also be tob, and Tencent cloud microenterprises do not leave quality behind
uni-app进阶之认证【day12】