SlideShare a Scribd company logo
1 of 11
Download to read offline
TechTalk
Linked DataWorking Group
19 July 2016
SQL
Allison Jai O’Dell | AJODELL@ufl.edu
SQL
Structured Query Language:
a standard language for accessing and manipulating relational databases
What Can SQL do?
• SQL can execute queries against a database
• SQL can retrieve data from a database
• SQL can insert records in a database
• SQL can update records in a database
• SQL can delete records from a database
• SQL can create new databases
• SQL can create new tables in a database
• SQL can create stored procedures in a database
• SQL can create views in a database
• SQL can set permissions on tables, procedures, and views
http://www.w3schools.com/sql/sql_intro.asp
Basic Queries
SELECT column
FROM Table;
SELECT column1, column2, column3
FROM Table;
SELECT *
FROM Table;
DistinctValues
SELECT DISTINCT column
FROM Table;
SELECT DISTINCT column1, column2
FROM Table;
CalculatedValues
SELECT weight/1000.0
FROM Specimens;
SELECT name, AVG(records)
FROM employees
GROUP BY name;
Expressions can use any fields, any arithmetic operators (+, -, *, and /)
and a variety of built-in functions
Aggregation
SELECT COUNT(*)
FROM Table
WHERE column = ‘criteria’;
SELECT SUM(column)
FROM Table;
SELECT MIN(column), MAX(column)
FROM Table
WHERE column1 = ‘value’ AND column2 <= 5.0;
Filtering
SELECT *
FROM Table
WHERE column = ‘criteria’;
SELECT *
FROM Table
WHERE (column1 = ‘criteria’) AND (column2 = ‘criteria’);
SELECT *
FROM Table
WHERE (column1 = ‘criteria’) OR (column2 = ‘criteria’) OR (column3
= ‘criteria’);
Sorting
SELECT *
FROM Table
ORDER BY column ASC;
SELECT *
FROM Table
ORDER BY column DESC;
SELECT *
FROM Species
ORDER BY genus ASC, species ASC;
Saving Queries for Future Use
CREATE VIEW viewname AS
SELECT something, something2
FROM Table
GROUP BY whatever;
Joins
SELECT *
FROM Table1
JOIN Table2
ON Table1.column = Table2.column;
SELECT *
FROM Table1
JOIN Table2
USING (column);

More Related Content

Viewers also liked

Cataloging Zines in an RDA Environment
Cataloging Zines in an RDA EnvironmentCataloging Zines in an RDA Environment
Cataloging Zines in an RDA EnvironmentAllison Jai O'Dell
 
Teaching Linked Data to Librarians: A Discussion of Pedagogical Methods
Teaching Linked Data to Librarians: A Discussion of Pedagogical MethodsTeaching Linked Data to Librarians: A Discussion of Pedagogical Methods
Teaching Linked Data to Librarians: A Discussion of Pedagogical MethodsAllison Jai O'Dell
 
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...Allison Jai O'Dell
 
Defining Usefulness and Facilitating Access Based on Research Applications
Defining Usefulness and Facilitating Access Based on Research ApplicationsDefining Usefulness and Facilitating Access Based on Research Applications
Defining Usefulness and Facilitating Access Based on Research ApplicationsAllison Jai O'Dell
 
Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: Univer...
Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: Univer...Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: Univer...
Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: Univer...Allison Jai O'Dell
 
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...Allison Jai O'Dell
 
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...Notes from the Library Juice Academy course, “Introduction to XML”: Universit...
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...Allison Jai O'Dell
 
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...Allison Jai O'Dell
 
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...Allison Jai O'Dell
 
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...Allison Jai O'Dell
 
Introducing the Artists' Books Thesaurus
Introducing the Artists' Books ThesaurusIntroducing the Artists' Books Thesaurus
Introducing the Artists' Books ThesaurusAllison Jai O'Dell
 
Big Metadata: Mining Special Collections Catalogs for New Knowledge
Big Metadata: Mining Special Collections Catalogs for New KnowledgeBig Metadata: Mining Special Collections Catalogs for New Knowledge
Big Metadata: Mining Special Collections Catalogs for New KnowledgeAllison Jai O'Dell
 
Understanding Regular expressions: Programming Historian Study Group, Univers...
Understanding Regular expressions: Programming Historian Study Group, Univers...Understanding Regular expressions: Programming Historian Study Group, Univers...
Understanding Regular expressions: Programming Historian Study Group, Univers...Allison Jai O'Dell
 
'I need help and FAST!': Immediate Guided Search with the assignFAST Gadget
'I need help and FAST!': Immediate Guided Search with the assignFAST Gadget'I need help and FAST!': Immediate Guided Search with the assignFAST Gadget
'I need help and FAST!': Immediate Guided Search with the assignFAST GadgetAllison Jai O'Dell
 
Cataloger 3.0: Competencies and Education for the BIBFRAME Catalog
Cataloger 3.0: Competencies and Education for the BIBFRAME CatalogCataloger 3.0: Competencies and Education for the BIBFRAME Catalog
Cataloger 3.0: Competencies and Education for the BIBFRAME CatalogAllison Jai O'Dell
 
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...Allison Jai O'Dell
 
Descriptive Cataloging for Special Collections, University of Miami Libraries
Descriptive Cataloging for Special Collections, University of Miami LibrariesDescriptive Cataloging for Special Collections, University of Miami Libraries
Descriptive Cataloging for Special Collections, University of Miami LibrariesAllison Jai O'Dell
 
Studying the book arts in the 21st century: using Linked Data to enhance know...
Studying the book arts in the 21st century: using Linked Data to enhance know...Studying the book arts in the 21st century: using Linked Data to enhance know...
Studying the book arts in the 21st century: using Linked Data to enhance know...Allison Jai O'Dell
 
Designing Metadata to Meet User Needs for Special Collections
Designing Metadata to Meet User Needs for Special CollectionsDesigning Metadata to Meet User Needs for Special Collections
Designing Metadata to Meet User Needs for Special CollectionsAllison Jai O'Dell
 

Viewers also liked (20)

Cataloging Zines in an RDA Environment
Cataloging Zines in an RDA EnvironmentCataloging Zines in an RDA Environment
Cataloging Zines in an RDA Environment
 
Teaching Linked Data to Librarians: A Discussion of Pedagogical Methods
Teaching Linked Data to Librarians: A Discussion of Pedagogical MethodsTeaching Linked Data to Librarians: A Discussion of Pedagogical Methods
Teaching Linked Data to Librarians: A Discussion of Pedagogical Methods
 
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...
Towards a Framework for Linked Rare Materials Metadata: An Overview of the Ta...
 
Defining Usefulness and Facilitating Access Based on Research Applications
Defining Usefulness and Facilitating Access Based on Research ApplicationsDefining Usefulness and Facilitating Access Based on Research Applications
Defining Usefulness and Facilitating Access Based on Research Applications
 
Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: Univer...
Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: Univer...Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: Univer...
Notes from the Library Juice Academy courses on “SPARQL Fundamentals”: Univer...
 
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
 
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...Notes from the Library Juice Academy course, “Introduction to XML”: Universit...
Notes from the Library Juice Academy course, “Introduction to XML”: Universit...
 
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...
JSON and Microdata: University of Florida Libraries, BIBFRAME Working Group, ...
 
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...
Ontologies and Ontology Languages: RDFS, OWL, and SKOS: University of Florida...
 
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...
Linked Data Principles and RDF: University of Florida Libraries, BIBFRAME Wor...
 
Introducing the Artists' Books Thesaurus
Introducing the Artists' Books ThesaurusIntroducing the Artists' Books Thesaurus
Introducing the Artists' Books Thesaurus
 
Big Metadata: Mining Special Collections Catalogs for New Knowledge
Big Metadata: Mining Special Collections Catalogs for New KnowledgeBig Metadata: Mining Special Collections Catalogs for New Knowledge
Big Metadata: Mining Special Collections Catalogs for New Knowledge
 
Understanding Regular expressions: Programming Historian Study Group, Univers...
Understanding Regular expressions: Programming Historian Study Group, Univers...Understanding Regular expressions: Programming Historian Study Group, Univers...
Understanding Regular expressions: Programming Historian Study Group, Univers...
 
'I need help and FAST!': Immediate Guided Search with the assignFAST Gadget
'I need help and FAST!': Immediate Guided Search with the assignFAST Gadget'I need help and FAST!': Immediate Guided Search with the assignFAST Gadget
'I need help and FAST!': Immediate Guided Search with the assignFAST Gadget
 
Cataloger 3.0: Competencies and Education for the BIBFRAME Catalog
Cataloger 3.0: Competencies and Education for the BIBFRAME CatalogCataloger 3.0: Competencies and Education for the BIBFRAME Catalog
Cataloger 3.0: Competencies and Education for the BIBFRAME Catalog
 
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...
Special Collections, Special Thesauri: Managing and Publishing Local Vocabula...
 
Using EAC-CPF
Using EAC-CPFUsing EAC-CPF
Using EAC-CPF
 
Descriptive Cataloging for Special Collections, University of Miami Libraries
Descriptive Cataloging for Special Collections, University of Miami LibrariesDescriptive Cataloging for Special Collections, University of Miami Libraries
Descriptive Cataloging for Special Collections, University of Miami Libraries
 
Studying the book arts in the 21st century: using Linked Data to enhance know...
Studying the book arts in the 21st century: using Linked Data to enhance know...Studying the book arts in the 21st century: using Linked Data to enhance know...
Studying the book arts in the 21st century: using Linked Data to enhance know...
 
Designing Metadata to Meet User Needs for Special Collections
Designing Metadata to Meet User Needs for Special CollectionsDesigning Metadata to Meet User Needs for Special Collections
Designing Metadata to Meet User Needs for Special Collections
 

Similar to SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 2016-07-19

Relational Database Language.pptx
Relational Database Language.pptxRelational Database Language.pptx
Relational Database Language.pptxSheethal Aji Mani
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredDanish Mehraj
 
Complete SQL Tutorial In Hindi By Rishabh Mishra.pdf
Complete SQL Tutorial In Hindi By Rishabh Mishra.pdfComplete SQL Tutorial In Hindi By Rishabh Mishra.pdf
Complete SQL Tutorial In Hindi By Rishabh Mishra.pdfssuserb5bb0e
 
SQL Fundamentals - Lecture 2
SQL Fundamentals - Lecture 2SQL Fundamentals - Lecture 2
SQL Fundamentals - Lecture 2MuhammadWaheed44
 
Lecture 2 sql {basics date type, constrains , integrity types etc.}
Lecture 2 sql {basics  date type, constrains , integrity types etc.}Lecture 2 sql {basics  date type, constrains , integrity types etc.}
Lecture 2 sql {basics date type, constrains , integrity types etc.}Shubham Shukla
 
Structured Query Language (SQL).pptx
Structured Query Language (SQL).pptxStructured Query Language (SQL).pptx
Structured Query Language (SQL).pptxEllenGracePorras
 
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptxFayChan8
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Vidyasagar Mundroy
 
SQL Overview-II23-PF20SA8Z.pptx
SQL Overview-II23-PF20SA8Z.pptxSQL Overview-II23-PF20SA8Z.pptx
SQL Overview-II23-PF20SA8Z.pptxMAYURUGALE6
 
SQL Overview.pptx
SQL Overview.pptxSQL Overview.pptx
SQL Overview.pptxMAYURUGALE6
 

Similar to SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 2016-07-19 (20)

Reviewing SQL Concepts
Reviewing SQL ConceptsReviewing SQL Concepts
Reviewing SQL Concepts
 
Sql in dbms
Sql in dbmsSql in dbms
Sql in dbms
 
SQL basics.pptx
SQL basics.pptxSQL basics.pptx
SQL basics.pptx
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
Oracle SQL Part1
Oracle SQL Part1Oracle SQL Part1
Oracle SQL Part1
 
Relational Database Language.pptx
Relational Database Language.pptxRelational Database Language.pptx
Relational Database Language.pptx
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
Complete SQL Tutorial In Hindi By Rishabh Mishra.pdf
Complete SQL Tutorial In Hindi By Rishabh Mishra.pdfComplete SQL Tutorial In Hindi By Rishabh Mishra.pdf
Complete SQL Tutorial In Hindi By Rishabh Mishra.pdf
 
SQL Fundamentals - Lecture 2
SQL Fundamentals - Lecture 2SQL Fundamentals - Lecture 2
SQL Fundamentals - Lecture 2
 
Lecture 2 sql {basics date type, constrains , integrity types etc.}
Lecture 2 sql {basics  date type, constrains , integrity types etc.}Lecture 2 sql {basics  date type, constrains , integrity types etc.}
Lecture 2 sql {basics date type, constrains , integrity types etc.}
 
Structured Query Language (SQL).pptx
Structured Query Language (SQL).pptxStructured Query Language (SQL).pptx
Structured Query Language (SQL).pptx
 
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)
 
SQL Overview-II23-PF20SA8Z.pptx
SQL Overview-II23-PF20SA8Z.pptxSQL Overview-II23-PF20SA8Z.pptx
SQL Overview-II23-PF20SA8Z.pptx
 
SQL Overview.pptx
SQL Overview.pptxSQL Overview.pptx
SQL Overview.pptx
 
MySQL intro
MySQL introMySQL intro
MySQL intro
 
MySQL intro
MySQL introMySQL intro
MySQL intro
 

Recently uploaded

Cash Is Still King: ATM market research '2023
Cash Is Still King: ATM market research '2023Cash Is Still King: ATM market research '2023
Cash Is Still King: ATM market research '2023Vladislav Solodkiy
 
How is Real-Time Analytics Different from Traditional OLAP?
How is Real-Time Analytics Different from Traditional OLAP?How is Real-Time Analytics Different from Traditional OLAP?
How is Real-Time Analytics Different from Traditional OLAP?sonikadigital1
 
Mapping the pubmed data under different suptopics using NLP.pptx
Mapping the pubmed data under different suptopics using NLP.pptxMapping the pubmed data under different suptopics using NLP.pptx
Mapping the pubmed data under different suptopics using NLP.pptxVenkatasubramani13
 
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptx
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptxCCS336-Cloud-Services-Management-Lecture-Notes-1.pptx
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptxdhiyaneswaranv1
 
Master's Thesis - Data Science - Presentation
Master's Thesis - Data Science - PresentationMaster's Thesis - Data Science - Presentation
Master's Thesis - Data Science - PresentationGiorgio Carbone
 
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024Guido X Jansen
 
Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...PrithaVashisht1
 
The Universal GTM - how we design GTM and dataLayer
The Universal GTM - how we design GTM and dataLayerThe Universal GTM - how we design GTM and dataLayer
The Universal GTM - how we design GTM and dataLayerPavel Šabatka
 
CI, CD -Tools to integrate without manual intervention
CI, CD -Tools to integrate without manual interventionCI, CD -Tools to integrate without manual intervention
CI, CD -Tools to integrate without manual interventionajayrajaganeshkayala
 
Rock Songs common codes and conventions.pptx
Rock Songs common codes and conventions.pptxRock Songs common codes and conventions.pptx
Rock Songs common codes and conventions.pptxFinatron037
 
Virtuosoft SmartSync Product Introduction
Virtuosoft SmartSync Product IntroductionVirtuosoft SmartSync Product Introduction
Virtuosoft SmartSync Product Introductionsanjaymuralee1
 
Optimal Decision Making - Cost Reduction in Logistics
Optimal Decision Making - Cost Reduction in LogisticsOptimal Decision Making - Cost Reduction in Logistics
Optimal Decision Making - Cost Reduction in LogisticsThinkInnovation
 
Strategic CX: A Deep Dive into Voice of the Customer Insights for Clarity
Strategic CX: A Deep Dive into Voice of the Customer Insights for ClarityStrategic CX: A Deep Dive into Voice of the Customer Insights for Clarity
Strategic CX: A Deep Dive into Voice of the Customer Insights for ClarityAggregage
 
5 Ds to Define Data Archiving Best Practices
5 Ds to Define Data Archiving Best Practices5 Ds to Define Data Archiving Best Practices
5 Ds to Define Data Archiving Best PracticesDataArchiva
 
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptx
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptxTINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptx
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptxDwiAyuSitiHartinah
 
ChistaDATA Real-Time DATA Analytics Infrastructure
ChistaDATA Real-Time DATA Analytics InfrastructureChistaDATA Real-Time DATA Analytics Infrastructure
ChistaDATA Real-Time DATA Analytics Infrastructuresonikadigital1
 

Recently uploaded (16)

Cash Is Still King: ATM market research '2023
Cash Is Still King: ATM market research '2023Cash Is Still King: ATM market research '2023
Cash Is Still King: ATM market research '2023
 
How is Real-Time Analytics Different from Traditional OLAP?
How is Real-Time Analytics Different from Traditional OLAP?How is Real-Time Analytics Different from Traditional OLAP?
How is Real-Time Analytics Different from Traditional OLAP?
 
Mapping the pubmed data under different suptopics using NLP.pptx
Mapping the pubmed data under different suptopics using NLP.pptxMapping the pubmed data under different suptopics using NLP.pptx
Mapping the pubmed data under different suptopics using NLP.pptx
 
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptx
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptxCCS336-Cloud-Services-Management-Lecture-Notes-1.pptx
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptx
 
Master's Thesis - Data Science - Presentation
Master's Thesis - Data Science - PresentationMaster's Thesis - Data Science - Presentation
Master's Thesis - Data Science - Presentation
 
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
 
Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...
 
The Universal GTM - how we design GTM and dataLayer
The Universal GTM - how we design GTM and dataLayerThe Universal GTM - how we design GTM and dataLayer
The Universal GTM - how we design GTM and dataLayer
 
CI, CD -Tools to integrate without manual intervention
CI, CD -Tools to integrate without manual interventionCI, CD -Tools to integrate without manual intervention
CI, CD -Tools to integrate without manual intervention
 
Rock Songs common codes and conventions.pptx
Rock Songs common codes and conventions.pptxRock Songs common codes and conventions.pptx
Rock Songs common codes and conventions.pptx
 
Virtuosoft SmartSync Product Introduction
Virtuosoft SmartSync Product IntroductionVirtuosoft SmartSync Product Introduction
Virtuosoft SmartSync Product Introduction
 
Optimal Decision Making - Cost Reduction in Logistics
Optimal Decision Making - Cost Reduction in LogisticsOptimal Decision Making - Cost Reduction in Logistics
Optimal Decision Making - Cost Reduction in Logistics
 
Strategic CX: A Deep Dive into Voice of the Customer Insights for Clarity
Strategic CX: A Deep Dive into Voice of the Customer Insights for ClarityStrategic CX: A Deep Dive into Voice of the Customer Insights for Clarity
Strategic CX: A Deep Dive into Voice of the Customer Insights for Clarity
 
5 Ds to Define Data Archiving Best Practices
5 Ds to Define Data Archiving Best Practices5 Ds to Define Data Archiving Best Practices
5 Ds to Define Data Archiving Best Practices
 
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptx
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptxTINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptx
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptx
 
ChistaDATA Real-Time DATA Analytics Infrastructure
ChistaDATA Real-Time DATA Analytics InfrastructureChistaDATA Real-Time DATA Analytics Infrastructure
ChistaDATA Real-Time DATA Analytics Infrastructure
 

SQL: University of Florida Libraries, Linked Data Working Group, Tech Talk 2016-07-19

  • 1. TechTalk Linked DataWorking Group 19 July 2016 SQL Allison Jai O’Dell | AJODELL@ufl.edu
  • 2. SQL Structured Query Language: a standard language for accessing and manipulating relational databases
  • 3. What Can SQL do? • SQL can execute queries against a database • SQL can retrieve data from a database • SQL can insert records in a database • SQL can update records in a database • SQL can delete records from a database • SQL can create new databases • SQL can create new tables in a database • SQL can create stored procedures in a database • SQL can create views in a database • SQL can set permissions on tables, procedures, and views http://www.w3schools.com/sql/sql_intro.asp
  • 4. Basic Queries SELECT column FROM Table; SELECT column1, column2, column3 FROM Table; SELECT * FROM Table;
  • 5. DistinctValues SELECT DISTINCT column FROM Table; SELECT DISTINCT column1, column2 FROM Table;
  • 6. CalculatedValues SELECT weight/1000.0 FROM Specimens; SELECT name, AVG(records) FROM employees GROUP BY name; Expressions can use any fields, any arithmetic operators (+, -, *, and /) and a variety of built-in functions
  • 7. Aggregation SELECT COUNT(*) FROM Table WHERE column = ‘criteria’; SELECT SUM(column) FROM Table; SELECT MIN(column), MAX(column) FROM Table WHERE column1 = ‘value’ AND column2 <= 5.0;
  • 8. Filtering SELECT * FROM Table WHERE column = ‘criteria’; SELECT * FROM Table WHERE (column1 = ‘criteria’) AND (column2 = ‘criteria’); SELECT * FROM Table WHERE (column1 = ‘criteria’) OR (column2 = ‘criteria’) OR (column3 = ‘criteria’);
  • 9. Sorting SELECT * FROM Table ORDER BY column ASC; SELECT * FROM Table ORDER BY column DESC; SELECT * FROM Species ORDER BY genus ASC, species ASC;
  • 10. Saving Queries for Future Use CREATE VIEW viewname AS SELECT something, something2 FROM Table GROUP BY whatever;
  • 11. Joins SELECT * FROM Table1 JOIN Table2 ON Table1.column = Table2.column; SELECT * FROM Table1 JOIN Table2 USING (column);