小白用STEEMSQL输出超链接 & Execl合并超链接

in cn •  8 years ago  (edited)

自从接触了STEEMSQL,头也不疼了,腰腿也好了。:) ,之前有朋友留言给我,说让我最好把所有参与谷哥点名的朋友都贴出来。我思前想后是这么个道理,于是就想借助STEEMSQL帮我这么一个忙!

如果能够通过SQL直接输出加好超链接的标题那是最好的了。不过一口吃不成一个胖子。第一步还是考虑,怎么输出完整的文章链接。

用steemsql导出的数据却是这样的:(字段:author、title、permlink、category)

http://steemit.com/category/@author/perlink  这样便是一个完整的链接了。那么如何通过sql语言,将不同字段输出成一个字段呢?

因为之前没学过sql语句,所以百度了一些教程。但是都是云里雾里实在看不明白。不过想到字符串可以直接用‘+’连接,姑且试了一下。

于是查询语句改为:SELECT title, 'https : //steemit. com/'+category+'/@'+author+'/'+permlink FROM Comments WHERE ………… 查询结果如下:

再想想,超链接格式不就是< a href="url" > xxx< /a> 直接输出这个结果,需要用的时候,粘贴代码即可。如此看来总算完成了任务。

于是查询语句改为:SELECT '< a href ="'+'https://steemit/'+category+'/ @'+author+'/'+permlink+'">'+title+'</a>' FROM Comments WHERE 查询结果如下:

到这儿为止,我的目的已经达到了。但是因为之前把title、url导出到execl表格中,思考下怎么将2个列,合并成带有超链接的列?如下图:

想到用HYPERLINK公式,先对单个记录试试:

成功,单个记录OK,多个记录,公式可以直接下拉批量处理:

直接复制超链接那一列,粘贴到steemit试试:

成功,看来直接使用execl 合并却也很简单,不需要粘贴代码,直接复制即可!

正好将第三期目前的文章展示出来,也算是学以致用了

我是小白,不会编程。使用SQL对于我来说,算是比较高级的技能了。感谢 @joythewanderer  和 @oflyhigh  的系列扫盲教程!   

AD:第三期谷哥点名开始了,题目:      传送门: 第二期“谷哥点名”活动结束 & 第三期开始! 

感谢您阅读 @jubi 的帖子 希望得到您的follow、upvote和reply ,对我最重要的是reply,期待和您的每次对话!        

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  8 years ago 

每次我都在想,你到底会不会编程。感觉你会,但你又好像说过不会,但现在看又好像很内行。。。

同感。我觉得菊哥好像有点分裂。

  ·  8 years ago (edited)

你学编程吧,你前途无可限量,正好你还年轻,还有时间,学这个大有前途!

Absolutely amazing.

Very informative.

This is beyond amazing.

沒找到自己xD 等下一次更新~

原来你的梦用的繁体,我搜索的简体的梦,所以查到。已经加上了。感谢您的参与

我也要慢慢学编程。

加油

  ·  8 years ago 

没找到我的。TT

You've exceeded my expectations.

应该我发帖在你之前。时间上错过了,现在加上。

  ·  8 years ago 

辛苦啦,谢谢 @jubi😉

You're a superstar!

You've exceeded my expectations.

This is exactly what I needed.

I'm inspired!

This is extraordinary!

Absolutely amazing.

You've got serious potential.

You're on fire!

I learned a lot, thanks!

I learned a lot, thanks!

This is beyond amazing.

You're on fire!

This is a game-changer.

I can't get enough of this.

Great job explaining.

You're a star!

This is absolutely epic!

Keep sharing such content.

Fantastic!

You've got skills to envy.

So cool!

Thank you for the insights.

  ·  8 years ago 

好吧,我放棄看這篇文章,哈哈

sql使用很简单,我和你一样 完全不懂,不过是用它查询点东西 倒是不难

  ·  8 years ago 

好吧,聽你一言,我認真學習一下🤣

You're a natural.

You've got a bright future ahead.

Thank you for the insights.

You've got my attention.

This is a masterpiece.

You've got serious talent.

You've got a new fan!

I'm speechless.

You've got the Midas touch.

This is a game-changer.

Well crafted.

I love this!

I'm blown away.

This is impressive stuff.

You've got a new fan!

This is awe-inspiring.

Keep it up!

You've got serious talent.

So interesting.

I'm inspired!

哈哈厉害

Well explained.

I'm speechless.

I'm so impressed!

You're so creative!

过来学一招!

呵呵 互相学习

You've done your homework.

You've got a new fan!

谢谢支持

upvote

thank you

好厲害! 我也來交作業了,看來是晚了。
https://steemit.com/cn/@magicmonk/2025-steemit-2025-a-story-on-the-steemian-dream

不晚不晚。感谢支持

  ·  8 years ago 

怎麼我的文跟 @ace108 大大的混為一體了呢?排名合一起計算嗎?😝😝

疏忽了 忘记这个回车,失误失误

这个留言要求列出全部参赛链接人莫非是我?我已经用 R 语言搞定了!哦耶!

好一個活學活用,不錯!

谢谢支持,学到了点知识,不用就得忘记了

I can't stop watching/reading/listening.

This is pure brilliance.