当前位置:网站首页>PSQL column to row
PSQL column to row
2022-06-25 02:27:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
demand
Student transcript
- Create table initialization
CREATE TABLE public.test ( name VARCHAR(20), score FLOAT, total_availability FLOAT, shelf_availability FLOAT );
INSERT INTO public.test (name, score, total_availability, shelf_availability) VALUES ('A', 1, 1.1, 1.2);
INSERT INTO public.test (name, score, total_availability, shelf_availability) VALUES ('B', 3, 2.1, 2.2);
INSERT INTO public.test (name, score, total_availability, shelf_availability) VALUES ('C', 6, 3.3, 3.4);
INSERT INTO public.test (name, score, total_availability, shelf_availability) VALUES ('D', 10, 4.1, 4.2);
SELECT * FROM public.test;- Transfer line column
SELECT name, score, unnest(ARRAY ['total_availability' :: TEXT, 'shelf_availability' :: TEXT]) AS kpi_details, unnest( ARRAY [public.test.total_availability :: NUMERIC(30, 16), public.test.shelf_availability :: NUMERIC(30, 16)]) AS value FROM public.test;Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/151771.html Link to the original text :https://javaforall.cn
边栏推荐
猜你喜欢

Please run IDA with elevated permissons for local debugging.

Lizuofan, co-founder of nonconvex: Taking quantification as his lifelong career

3 years of testing experience. I don't even understand what I really need on my resume. I need 20K to open my mouth?

记一次beego通过go get命令后找不到bee.exe的坑

EasyCVR国标协议接入的通道,在线通道部分播放异常是什么原因?

How to monitor the log through the easycvr interface to observe the platform streaming?

Intranet learning notes (7)

软件测试人员的7个等级,据说只有1%的人能做到级别7

测试/开发程序员,30而立,你是否觉得迷茫?又当何去何从......

消息称一加将很快更新TWS耳塞、智能手表和手环产品线
随机推荐
Software testing salary in first tier cities - are you dragging your feet
tmux 如何自定义背景颜色 | How does the tmux color palette work?
ARM汇编中的栈桢小结
都2022年了,你还不了解什么是性能测试?
Once beego failed to find bee after passing the go get command Exe's pit
Intranet learning notes (7)
beescms网站渗透测试和修复意见「建议收藏」
psql 列转行
当一个接口出现异常时候,你是如何分析异常的?
如何通过EasyCVR接口监测日志观察平台拉流情况?
高速缓存Cache详解(西电考研向)
转行软件测试2年了,给还在犹豫的女生一点建议
背了八股文,六月赢麻了……
记一次beego通过go get命令后找不到bee.exe的坑
What are the SQL aggregate functions
当他们在私域里,掌握了分寸感
vim的Dirvish中文文档
Application of TSDB in civil aircraft industry
After reciting the eight part essay, I won the hemp in June
【第26天】给定 n 个元素的升序数组nums,求实现一个函数在nums中寻找target的下标 | 初识二分查找