• Home
  • About
    • About Me
    • Resume
  • Research
    • GAVA
    • NLP
  • Creative Writing
    • Stories
    • Poetry
    • Found in Translation
  • Music
  • Photo Album
    • Catch The Turtle
    • Me in Andmans
    • Andamanese Panorama
    • The Dadhiyal Me
    • Catching the Taj!
    • Me @My Worplace!
    • Hyderabad Film City
    • Miscellaneus
    • CL-Trip 2009 to Kasauli & Shimla
    • Jaipur November, 2009
  • Videos
  • My Favourites
    • Ghazals
  • Generalia
  • Search
  • Contact
  1. You are here:  
  2. Home

Home

Useful MySQL Queries for a Linguist Data Manager

Details
Category: Generalia
Published: 15 May 2021

 

Concatenate / combine multiple cell content with a separator and group them by another column .

SELECT distinct(groupByColumnName), GROUP_CONCAT(contentColumnToCombine SEPARATOR '; ') FROM `dbname`.`tableName` group by groupByColumnName;

 

Find fields/words with regex having one character in between, for example all words containing .aXe.
SELECT * FROM database.table where headword REGEXP '.*a.e.*'; and pron1 like '%end%' and charlen < 6;

Best method to backup and restore all DBs in MySQL. This ensures that the dbs are separate and does not have bulk issues.
Step 1. get a list of all the databases
Step 2: Create a batch file to dump all the DBs, one by one, using the following command:
    mysqldump -u user -pPassword dbname > dbname.sql
Step 3: Create a batch file to restore all the DBs, one by one, using the following command:
    mysql -u user -pPassword dbname < dbname.sql

 

Update a column with the character count of another column within the same table.

update dbName.tableName a set a.columnToUpdate=char_length(a.columnToCountCharacterOf) where a.columnToCountCharacterOf=a.columnToCountCharacterOf;

 

Load tab delimited data into a table:

Remove tabs from a given mysql field:

update dbName.TableName set ColumnName = replace(ColumnName,'\t','');

 

Enable Local Data load after logging into the MySQL prompt: SET GLOBAL local_infile=ON;

LOAD DATA LOCAL INFILE 'C:/director/importdata.txt' INTO TABLE dbName.tableName FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n';

select distinct(lang), (sum(textlength)) FROM dbName.tableName group by lang;


Count number of words in a field:
SELECT LENGTH(langtext) - LENGTH(REPLACE(langtext, ' ', ''))+1, id FROM dbName.tableName INTO OUTFILE "D:\\outdirector\\length.txt" limit 10;

Read more: Useful MySQL Queries for a Linguist Data Manager

अलग भईले झारखंड आब खईह शकरकंद

Details
Category: Music
Published: 30 March 2021

मिसरी मलाई खईलू, मिसरी मलाई खईलू, कईलू तन बुलंद
अलग भईले झारखंड आब खईह शकरकंद

मीलि नाहि दफ़तर मे माहे-माह वेतनिया, करे नाहि पईबू मास-मछरी के सेवनिया
सारी नाहि पहिरे पईबू, सारी नाहि पहिरे पईबू, धनिया मन-पसंद आब खईह शकरकंद
सारी नाहि पेन्हे पईबू, सारी नाहि पेन्हे पईबू, धनिया मन-पसंद आब खईह शकरकंद
अलग भईले झारखंड, आब खईह शकरकंद

Read more: अलग भईले झारखंड आब खईह शकरकंद

Excel Formulas

Details
Category: Generalia
Published: 28 March 2021
These are some of excel formulas I use often.

1. The following to to find the unique case sensitive entries in a column:

=REPT($A2,SUMPRODUCT(--EXACT($A2,$A$1:$A1))=0)

Read more: Excel Formulas

गोस्वामी तुलसीदास रचित श्री रुद्राष्टकम् - शिव वंदना

Details
Category: Generalia
Published: 30 September 2020

गोस्वामी तुलसीदास रचित श्री रुद्राष्टकम् - शिव वंदना


नमामीशमीशान निर्वाणरूपं, विभुं व्यापकं ब्रह्मवेदस्वरूपम् ।
निजं निर्गुणं निर्विकल्पं निरीहं, चिदाकाशमाकाशवासं भजेऽहम् ॥ १॥

निराकारमोंकारमूलं तुरीयं, गिरा ज्ञान गोतीतमीशं गिरीशम् ।
करालं महाकाल कालं कृपालं, गुणागार संसारपारं नतोऽहम् ॥ २॥

Read more: गोस्वामी तुलसीदास रचित श्री रुद्राष्टकम् - शिव वंदना

Page 2 of 6

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
Copyright © 2008 - 2025 All Rights Reserved.

A Linguist's Take