The following oracle query purports to output a word count for all words found in a table column. Is this possible in MYSQL?
Mike
=============== =============== =============== ======
Measuring of word frequency in text data SQL query:
select Word, count(*) Frequency
from
(
select substr(text, instr(' '||text, ' ', 1, n),
instr(' '||text||' ', ' ', 1, n+1)-instr(' '||text, ' ', 1, n)-1) Word
from
(
select translate(lower (comments),
',.!?:;''"()[]{}<>-+=*/\$#%&^@|'||chr( 9)||chr(10),
' ') text
from all_tab_comment s
where owner = 'SYS'
and comments is not null
), rowset
where nvl(instr(' '||text||' ', ' ', 1, n+1), 0) > 0
and instr(' '||text||' ', ' ', 1, n+1)-instr(' '||text, ' ', 1, n)-1 > 0
and n < 40
)
group by word
order by 2 DESC
0 2740 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Reply via newsgroup |
last post by:
Folks,
When performing an update in mysql (using PHP), can I find out how many
records were matched?
mysql_affected_rows() won't work... and I have the following problem
that I thought I could resolve with a simple function:
Example:
I have 50records - I want to update a selection of the recods - some,
|
by: Phil Powell |
last post by:
The table already has a fulltext index and from there I can use the
MySQL fulltext search query to get results as well as the relevancy
score.
The problem I have is that MySQL has a default setting whereby the
minimum amount of characters is 4 for a search. Being that we're
government and full of TLA (three-letter acronyms), that is not
practical, and furthermore, the app I'm building must be fully
portable, so having MySQL tweaked...
|
by: Philip Stoev |
last post by:
Hi all,
Please tell me if any of this makes sense. Any pointers to relevant
projects/articles will be much appreciated.
Philip Stoev
http://www.stoev.org/pivot/manifest.htm
===================================
|
by: Mike Chirico |
last post by:
Interesting Things to Know about MySQL
Mike Chirico (mchirico@users.sourceforge.net)
Copyright (GPU Free Documentation License) 2004
Last Updated: Mon Jun 7 10:37:28 EDT 2004
The latest version of this document can be found at:
http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download
|
by: JB |
last post by:
Hey ppl,
I'm experiancing a very weird problem with my current Win32(win2k/XP)
application.
I'm using:
* Delphi 7
* ADO
* mySQL ODBC 3.51 drivers
| |
by: Ross Contino |
last post by:
Hello to all:
I have been searching the web for examples on how to determine a median
value in a mySQL table. I have reviewed the article at
http://mysql.progen.com.tr/doc/en/Group_by_functions.html. I am an
experienced VB programmer that has recently moved to PHP/mySQL. My employer
has a text file outputted from a vendor specific software with data.
However it cannot be manipulated because it is text. I created a web that
reads the...
|
by: Auddog |
last post by:
I have the following query that works in mysql:
select id, order_no, price, count(item_no), sum(price) from production
WHERE item_no = '27714'
group by item_no;
When I setup my query in php, I use:
$query2 = "SELECT id, order_no, price, count(item_no) as count from
production where item_no = '27714";
|
by: =?iso-8859-1?B?Sm/jbyBNb3JhaXM=?= |
last post by:
Hi there guys,
My doubt is related with MySQL and Transactions (InnoDB) so here it
goes:
I have a query like this:
$query = 'START TRANSACTION; ';
$query .= 'UPDATE sections ';
$query .= 'SET position=position-%d ';
|
by: Atli |
last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users.
Anyone should be able to get through this without much trouble. Programming knowledge is not required.
Index
What is SQL?
Why MySQL?
Installing MySQL.
Using the MySQL command line interface
|
by: M. Savas Zorlu |
last post by:
Hi,
I just decided to leave Mssql and start using Mysql. I am having some
problems with my queries; is there anyone here who has a knowledge of
query syntax in Mysql?
If so, I need some help with couple of queries.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |