当前位置:网站首页>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
边栏推荐
- 商城项目 pc----商品详情页
- random list随机生成不重复数
- Computing service network: a systematic revolution of multi integration
- Please run IDA with elevated permissons for local debugging.
- Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (3) -- set the database to archive mode
- 消息称一加将很快更新TWS耳塞、智能手表和手环产品线
- Dirvish Chinese document of vim
- 高速缓存Cache详解(西电考研向)
- Cusdis - 轻量级、隐私优先的开源评论系统 | 倾城之链
- 调用系统函数安全方案
猜你喜欢
When they are in private, they have a sense of propriety
Experience of epidemic prevention and control, home office and online teaching | community essay solicitation
After reciting the eight part essay, I won the hemp in June
DDD concept is complex and difficult to understand. How to design code implementation model in practice?
左手梦想 右手责任 广汽本田不光关注销量 还有儿童安全
AI服装生成,帮你完成服装设计的最后一步
Please run IDA with elevated permissons for local debugging.
Hashcat 的使用
What are the reasons for the abnormal playback of the online channel of the channel accessed by easycvr national standard protocol?
探索C语言程序奥秘——C语言程序编译与预处理
随机推荐
软件测试人员的7个等级,据说只有1%的人能做到级别7
Multimodal emotion recognition_ Research on emotion recognition based on multimodal fusion
内网学习笔记(6)
华为、阿里等大厂程序员真的好找对象吗?
记一次beego通过go get命令后找不到bee.exe的坑
产业互联网的概念里有「互联网」字眼,但却是一个和互联网并不关联的存在
Cusdis - lightweight, privacy first open source comment system | chain of the city
js正则匹配数字、大小写字母、下划线、中线和点[通俗易懂]
beescms网站渗透测试和修复意见「建议收藏」
Talking about the advantages of flying book in development work | community essay solicitation
tmux 如何自定义背景颜色 | How does the tmux color palette work?
Use of hashcat
I've been doing software testing for two years. I'd like to give some advice to girls who are still hesitating
当一个接口出现异常时候,你是如何分析异常的?
计网 | 【四 网络层】知识点及例题
[STL source code analysis] configurator (to be supplemented)
Is it out of reach to enter Ali as a tester? Here may be the answer you want
分布式事务解决方案和代码落地
Pit entry machine learning: I. Introduction
random list随机生成不重复数