当前位置:网站首页>PgSQL converts string to double type (to_number())
PgSQL converts string to double type (to_number())
2022-07-03 07:22:00 【Maple Leaf pear flower】
Today I write sql When , Find out PG There is a table in which the area field is set to string type , In this way, statistics cannot be used sum Function , So you need to convert the string to double Add the types .
select sum(to_number(mj,9999.99)) as amountmj from table group by areaamong 9999.99 It doesn't matter mj The value of the field is still amountmj The value of cannot exceed 9999.99, And keep two decimal places .
边栏推荐
- JUC forkjoinpool branch merge framework - work theft
- The difference between typescript let and VaR
- SharePoint modification usage analysis report is more than 30 days
- Pat grade a real problem 1166
- 带你全流程,全方位的了解属于测试的软件事故
- Jeecg request URL signature
- PAT甲级真题1166
- 691. Cube IV
- [cmake] cmake link SQLite Library
- I. D3.js hello world
猜你喜欢
![[Fiddler actual operation] how to use Fiddler to capture packets on Apple Mobile Phones](/img/d0/850e095a43610366d6144b2471f3f7.jpg)
[Fiddler actual operation] how to use Fiddler to capture packets on Apple Mobile Phones

C代码生产YUV420 planar格式文件

Basic knowledge about SQL database

URL programming
![[set theory] equivalence classes (concept of equivalence classes | examples of equivalence classes | properties of equivalence classes | quotient sets | examples of quotient sets)*](/img/1f/f579110a408c5b5a094733be57ed90.jpg)
[set theory] equivalence classes (concept of equivalence classes | examples of equivalence classes | properties of equivalence classes | quotient sets | examples of quotient sets)*

The embodiment of generics in inheritance and wildcards

Inno setup production and installation package

Map interface and method

高并发内存池

Margin left: -100% understanding in the Grail layout
随机推荐
Advanced API (character stream & net for beginners)
[untitled]
Download address collection of various versions of devaexpress
La différence entre le let Typescript et le Var
[most detailed] latest and complete redis interview book (50)
sharepoint 2007 versions
Use of framework
Circuit, packet and message exchange
TypeScript let與var的區別
C code production YUV420 planar format file
MySQL syntax (basic)
7.2 brush two questions
【无标题】
[set theory] equivalence classes (concept of equivalence classes | examples of equivalence classes | properties of equivalence classes | quotient sets | examples of quotient sets)*
Store WordPress media content on 4everland to complete decentralized storage
Le Seigneur des anneaux: l'anneau du pouvoir
3311. 最长算术
Upgrade CentOS php7.2.24 to php7.3
2. E-commerce tool cefsharp autojs MySQL Alibaba cloud react C RPA automated script, open source log
“百度杯”CTF比赛 2017 二月场,Web:爆破-1