blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
9bff9029b59623ea11b3254c4cdae439edd9cf9d | SQL | LupusSanctus/training | /SQL/8_4.sql | UTF-8 | 224 | 3.515625 | 4 | [] | no_license | SELECT d.dname, e.ename, e.sal
FROM emp e, dept d
WHERE d.deptno = e.deptno
UNION
SELECT 'NULL', 'TOTAL:', SUM(ex.sal) OVER (PARTITION BY ex.deptno ORDER BY ex.ename) sal_sum
FROM emp ex, dept dx
WHERE dx.deptno = ex.deptno
| true |
5a492af934733c9485e2b7077bf1a7698bd9ce64 | SQL | Better-Boy/SQL-Interview-Questions | /LeetCode/1581. Customer Who Visited but Did Not Make Any Transactions.sql | UTF-8 | 155 | 3.53125 | 4 | [
"MIT"
] | permissive | SELECT customer_id
,COUNT(*) AS count_no_trans
FROM Visits v
LEFT JOIN Transactions t
ON v.visit_id = t.visit_id
WHERE amount is null
GROUP BY 1; | true |
347ed33ddc7445c95f7e805518c3a32dd6dca481 | SQL | Denky230/OhhMusic | /bbdd/bbdd.sql | UTF-8 | 278,978 | 3.59375 | 4 | [] | no_license | create database ohhmusic;
use ohhmusic;
create table city(
id_city int not null primary key,
name varchar(255) not null,
community varchar(255)
);
create table user(
id_user int not null primary key auto_increment,
type int(1) not null,
username varchar(25) not null unique,
pass varchar(255) not null,
name varchar(25... | true |
f9866e2b8824af145fd4429e46036174ec75e7f8 | SQL | pounard/jaccob | /src/Jaccob/MediaBundle/Resources/doc/install.sql | UTF-8 | 3,822 | 3.703125 | 4 | [] | no_license |
CREATE TABLE album (
id SERIAL PRIMARY KEY,
id_account INTEGER NOT NULL,
id_media_preview INTEGER,
access_level INTEGER DEFAULT 0,
path VARCHAR(1024) NOT NULL,
user_name VARCHAR(255),
file_count INTEGER NOT NULL DEFAULT 0,
ts_added TIMESTAMP NOT NULL DEFAULT NOW(),
ts_updated TIMEST... | true |
0132aa839ea6ab46f6ccef504f3054057e4069cf | SQL | wifido/spms-code | /code/database/V1.2/8_create_table_for_etl_sch.sql | UTF-8 | 2,353 | 3.328125 | 3 | [] | no_license |
DROP TABLE SPMS.TT_SCH_EMP_ATTENCE_CLASS;
-- Create table
create table SPMS.TT_SCH_EMP_ATTENCE_CLASS
(
ID NUMBER(20),
EMP_CODE VARCHAR2(10),
EMP_TYPE VARCHAR2(2),
BEGIN_DATE DATE,
END_DATE DATE,
BEGIN_TM VARCHAR2(20),
END_TM VARCHAR2(20),
TMR_... | true |
561104521247f3a99bd2a167768b85d745407338 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day14/select0055.sql | UTF-8 | 191 | 2.8125 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-13T00:55:00Z' AND timestamp<'2017-11-14T00:55:00Z' AND SENSOR_ID='ee3d04e8_5b52_4872_b848_5a7c7336ee12'
| true |
fca65ea6dc94c8b4d83c1e3d4fed59d54413e1a7 | SQL | tadrebk-project/tadrebk | /Database files/Tadreabk (1).sql | UTF-8 | 18,056 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 30, 2021 at 06:30 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
91db1f298fa231d320256fb738eeb61872dc1821 | SQL | phuphan626/sql-challenge | /query_script.sql | UTF-8 | 3,893 | 4.71875 | 5 | [] | no_license | -- 1. List the following details of each employee: employee number, last name, first name, sex, and salary.
-- For this, I can query the above information, using the right join from 'employees' to 'salaries' to get the salary column
-- Because the employees table have different first emp_no(473302) from the salaries ta... | true |
abde016db788af7cd7510415b3d603f447307531 | SQL | mckummel/mysql-study | /string-function-challenge.sql | UTF-8 | 636 | 3.5625 | 4 | [] | no_license | SELECT UPPER(REVERSE('Why does my cat look at me with such hatred'));
-- I-like-cats
SELECT REPLACE(title,' ','->') AS title FROM books;
SELECT author_lname AS forwards, REVERSE(author_lname) AS backwards FROM books;
SELECT UPPER(CONCAT(author_fname,' ',author_lname)) AS 'full name in caps' FROM books;
SELECT CONC... | true |
96871737970235cebad832ff8625c3a64bea42e7 | SQL | akula-srinu/Customization_Test | /custom/NVWB_INV_Onhand_Serials_Vsat.sql | UTF-8 | 83,095 | 2.640625 | 3 | [] | no_license | -- *******************************************************************************
-- FileName: NVWB_INV_Onhand_Serials_Vsat.sql
--
-- Date Created: 2019/Aug/28 06:12:39
-- Created By: nemuser
--
-- Source:
-- - Package: Package_2018_P11_B1_DEV_NEW
-- - Environment: EBSPJ... | true |
b4472bfcf99012b05b21a1ab0408040d9611c558 | SQL | jongvin/werp | /werp/erpw/general/t_web/sql/Procedure/SP_T_FL_DEPT_EXEC_CLOSE.sql | UHC | 3,217 | 3.015625 | 3 | [] | no_license | Create Or Replace Procedure SP_T_FL_DEPT_EXEC_CLOSE_I
(
AR_COMP_CODE VARCHAR2,
AR_CLSE_ACC_ID VARCHAR2,
AR_DEPT_CODE VARCHAR2,
AR_WORK_YM VARCHAR2,
AR_CRTUSERNO VARC... | true |
a4b302b2e4cce626a6ccee50ec8cdc3e8527587b | SQL | frederik-jacques/CakePHP-CKEditor | /DATABASE_DUMP.sql | UTF-8 | 819 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.7
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 03, 2013 at 08:49 PM
-- Server version: 5.5.29
-- PHP Version: 5.4.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `cakephpCKEditor`
--
CREATE DATABASE `cakephpCKEditor... | true |
a6213cc977e2abe4338fda4cb4565d70cf2a3e1c | SQL | ivaylo9512/extension-market-remastered | /src/main/resources/integrationTestsSql/ExtensionsData.sql | UTF-8 | 4,637 | 3.34375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: database-2.cd3qhxwxyvzj.eu-west-2.rds.amazonaws.com
-- Server version: 8.0.23 - Source distribution
-- Server OS: Linux
-- HeidiSQL Version: 9.4.0.5125
-- ---------------------------... | true |
a79b0d3304f1be7454788a20713a7ba369e2a60a | SQL | btellstrom/EzProfMeeting | /schema.sql | UTF-8 | 7,873 | 3.265625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `ezprofmeeting` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `ezprofmeeting`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: ezprofmeeting
-- ------------------------------------------------------
-- Server version 5.7.21-log
/*!40101 SET @OLD_C... | true |
5a20d8a360038e51af303caab4cfb34443f10203 | SQL | benwhicks/bbadmin | /SQL/nursing course grades.sql | UTF-8 | 2,397 | 4.25 | 4 | [] | no_license | /* For collecting historical data on Bachelor of Nursing course
*/
select concat(firstname, ' ', lastname) as student_name, lastname, firstname, id,
user_id,
term_name, subject_name, subject_code, subject_main, subject_name_child,
position, title, weight, description,
score, possible,
... | true |
8884d470fd0eb15cf771cc37a93395b8bcc0843e | SQL | Yves-T/PHP3_BLOG | /sql/comment.sql | UTF-8 | 279 | 3.3125 | 3 | [] | no_license | CREATE TABLE comment (
comment_id INT NOT NULL AUTO_INCREMENT,
entry_id INT NOT NULL,
author VARCHAR(75),
txt TEXT,
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (comment_id),
FOREIGN KEY (entry_id) REFERENCES blog_entry (entry_id)
);
| true |
8b31856f46421a4953afe89d04bd25a60b86bcec | SQL | hpereira98/DatabaseAdministration | /bd/querys_cdb.sql | UTF-8 | 1,313 | 2.90625 | 3 | [] | no_license | -- PDB
select * from v$database;
-- PDB
select * from v$instance;
select instance_name from v$instance;
select * from dba_cpu_usage_statistics;
-- SESSION
-- PDB
select username, status, type, logon_time, schemaname from v$session;
-- TABLESPACES
select * from dba_tablespaces
order by tablespace_name ASC;
select *... | true |
a5aa5307f8ab03afde1bd45cd575d26bd3983847 | SQL | lindellcarternyc/express-prisma-typescript-starter | /prisma/migrations/20210513174625_add_user_roles/migration.sql | UTF-8 | 648 | 4.15625 | 4 | [] | no_license | -- CreateTable
CREATE TABLE "Role" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "UserRole" (
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"userId" INTEGER NOT NULL,
"roleId" INTEGER NOT NULL,
PRIMARY KEY ("userId")
);
-- ... | true |
e8cc000fca33c3df8e274576a967013a173e120e | SQL | DebugKing-GoGoGo/mysql | /paas_aom/20191212焦正林财务收入固定金额按月均摊.sql | UTF-8 | 945 | 3.640625 | 4 | [] | no_license | SELECT
cont.S_CONCODE, cont.S_CONNAME,
null,checkstg.DT_MAINSTART, checkstg.DT_MAINEND,
12*(year(DT_MAINEND)-year(DT_MAINSTART)) + month(DT_MAINEND)-month(DT_MAINSTART)+1 `维保期`,
null,t.yearmonth,
checkstg.DL_CHECKAMT/(12*(year(DT_MAINEND)-year(DT_MAINSTART)) + month(DT_MAINEND)-month(DT_MAINSTART)+1) income,
translate... | true |
e58c376721d60817e05f044c7192ce1fd2becd21 | SQL | Vulnerator/Vulnerator | /Resources/DdlFiles/Tables/Create/VulnerabilitiesCCIs.ddl | UTF-8 | 352 | 3.84375 | 4 | [
"MIT",
"CC-BY-SA-3.0",
"CC-BY-ND-3.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license"
] | permissive | CREATE TABLE IF NOT EXISTS VulnerabilitiesCCIs (
VulnerabilityCCI_ID INTEGER PRIMARY KEY,
Vulnerability_ID INTEGER NOT NULL,
CCI_ID INTEGER NOT NULL,
UNIQUE (Vulnerability_ID, CCI_ID) ON CONFLICT IGNORE,
FOREIGN KEY (Vulnerability_ID) REFERENCES Vulnerabilities(Vulnerability_ID),
FOREIGN KEY (CC... | true |
4ff5c24b2a20efc8122d336ab971d9b2a201ab68 | SQL | florinapp/florin-server | /schema.sql | UTF-8 | 1,492 | 3.765625 | 4 | [] | no_license | CREATE TABLE accounts (
id INTEGER NOT NULL,
institution VARCHAR(64) NOT NULL,
name VARCHAR(64) NOT NULL,
type VARCHAR(32) NOT NULL,
signature VARCHAR(64),
deleted BOOLEAN NOT NULL,
PRIMARY KEY (id),
CHECK (deleted IN (0, 1))
);
CREATE TABLE categories (
id INTEGER NOT NULL,
name VARCHAR(255) NOT NULL... | true |
9fb9bb7b33f1783aa348820dc2fe20bff318357f | SQL | cl08/devlog | /backend/src/DB/devlog.sql | UTF-8 | 7,495 | 3.5 | 4 | [] | no_license | use devlog;
CREATE TABLE `user` (
`seq` int primary key auto_increment,
`id` varchar(50) not null,
`password` varchar(50) not null,
`email` varchar(100) not null,
`nickname` varchar(50),
`name` varchar(50) not null,
`tel` varchar(20),
`profile_img_url` varchar(256),
`github_url` varchar(256),
`birt... | true |
0eb0526df91e0fa86280b0686b89cfd15d3c0846 | SQL | martinsantibanez/tallerbd | /Trabajo Final/triggers.sql | UTF-8 | 305 | 3.15625 | 3 | [] | no_license | CREATE TABLE logs(
tiempo date,
tipo text
);
CREATE OR REPLACE FUNCTION log_delete()
RETURNS trigger AS
$del$
BEGIN
INSERT INTO Logs(tiempo, tipo)
VALUES(now(), "DELETE");
RETURN NEW;
END;
$del$
CREATE TRIGGER Book
BEFORE DELETE
ON Books
FOR EACH ROW
EXECUTE PROCEDURE log_delete(); | true |
2ab5263fe34cfbc895400f1e833dd045947cecde | SQL | poonamkurmi110/Campus | /campusdb.sql | UTF-8 | 9,234 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 18, 2018 at 05:58 AM
-- Server version: 5.1.54
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... | true |
2b573615155626845102f23719fd3422c15384ef | SQL | kaxterzz/vehicle-rental-system | /db/vehicle_rental_system.sql | UTF-8 | 6,282 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 21, 2018 at 03:49 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.1.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
4b2abc4065b49232ef6f0db1357110acd1b49792 | SQL | nbthales/Oracle-pl-sql-Forms-Reports | /aula2421.sql | UTF-8 | 665 | 3.15625 | 3 | [] | no_license | create or replace procedure pesquisa_curso
--(codigo IN number)
(codigo IN estoque.est_codigo%TYPE,
nome_curso OUT estoque.est_nome%TYPE,
preco OUT estoque.est_precovenda%TYPE)
is
--nome_curso varchar2(40);
--nome_curso OUT estoque.est_nome%TYPE;
begin
select est_nome, est_precovenda into nome_curso, preco fr... | true |
611c12522d3eb490962dd40edbd50b77e98754fd | SQL | 98d/springcloud-demo | /javasea-springcloud-alibaba/doc/business/storage_tbl.sql | UTF-8 | 875 | 2.9375 | 3 | [] | no_license | /*
Navicat MariaDB Data Transfer
Source Server : 36
Source Server Version : 100322
Source Host : 192.168.0.36:3308
Source Database : db_storage
Target Server Type : MariaDB
Target Server Version : 100322
File Encoding : 65001
Date: 2020-05-14 13:02:05
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
5dc59c3dec00759097c50ef4bf6adc98d8d2f4f6 | SQL | tumrod/CS347_ARLNL | /f70193.sql | UTF-8 | 528,483 | 2.765625 | 3 | [] | no_license | set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle user
-- APEX_050000 or as the owner ... | true |
1cb03cbab5388dee59259848211eeba2f0746334 | SQL | grupo03-integrador/Desenvolvimento-Web | /Dump/pastelaria_db_tb_comanda_recebimento.sql | UTF-8 | 2,377 | 2.84375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: localhost Database: pastelaria_db
-- ------------------------------------------------------
-- Server version 5.7.29-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... | true |
81930285473dfb594df779c967f97bb2a754a0e5 | SQL | swapnilaryan/simpleCabBookingBackend | /book_cab.sql | UTF-8 | 5,147 | 3.140625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for osx10.12 (x86_64)
--
-- Host: localhost Database: book_cab
-- ------------------------------------------------------
-- Server version 5.7.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... | true |
223e0211f06602fde6238408b1e12424bf449016 | SQL | fv0008/Psychology | /心理咨询类.sql | UTF-8 | 7,714 | 3.359375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 心理咨询
Source Server Version : 50557
Source Host : 122.114.151.4:3306
Source Database : nxxlzx
Target Server Type : MYSQL
Target Server Version : 50557
File Encoding : 65001
Date: 2019-08-13 16:41:47
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
991ed91852db4d07a53b239a58f8d020f3b0cc16 | SQL | hrr47-fec8-webber/carousel-service | /db/carousel.sql | UTF-8 | 209 | 2.625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS carousel;
USE carousel;
CREATE TABLE images (
id INT NOT NULL AUTO_INCREMENT,
url VARCHAR(255),
location_id INT NOT NULL,
img_order INT NOT NULL,
PRIMARY KEY (id)
);
| true |
7689b0d0a81453701110e38a6fd0fe2d2894f2dd | SQL | uuuzombie/web_demo_multi_tenant_separate_schema | /depoly/shiro/user_roles.sql | UTF-8 | 219 | 2.90625 | 3 | [] | no_license |
create table user_roles (
id bigserial not null primary key,
username varchar(255) not null,
role_name varchar(255) not null
)
create unique index uniq_idx_user_roles on user_roles(username, role_name);
| true |
f67410b20aed17e9663ee4622b2bf9e1ba2e711c | SQL | kort/kort | /server/database/osm_errors/osm_errors.sql | UTF-8 | 1,149 | 3.578125 | 4 | [
"MIT"
] | permissive | create extension dblink with schema osm_errors;
create sequence osm_errors.error_id;
create table osm_errors.errors (
schema varchar(6) not null default '100',
error_id bigint not null,
error_type_id integer not null,
error_name varchar(100) not null,
object_type keepright.osm_type not null,
o... | true |
744b5d97c193611e7784ede3567ac722eadce625 | SQL | MuhammadArifiin/responsi-pemwebmobile1 | /ResponsiPemWebMobile/dcornercoffee.sql | UTF-8 | 1,711 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 23, 2021 at 12:06 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
8cde511496848c6e8578c2fb29a5cec766409331 | SQL | EricLau1/CmdShock | /v1/sql/create.sql | UTF-8 | 797 | 3.640625 | 4 | [] | no_license | create database cmdshock
default character set utf8
default collate utf8_general_ci;
use cmdshock;
create table if not exists os(
id int auto_increment primary key,
platform varchar(100) not null,
architecture varchar(6) default 'x64'
)
default charset = utf8;
create table if not exists terminal(
id int auto_increme... | true |
dda3de75a8ee9245959e5813e2377003e8ed82d8 | SQL | AbdulRahmanAbouzaid/talents-website | /notifications.sql | UTF-8 | 2,399 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 25, 2019 at 08:19 PM
-- Server version: 5.7.11
-- PHP Version: 7.0.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
33c263ecf89ae54478211182c7de87af60ffa89b | SQL | aysa-wlh13/mom-website | /db/seed.sql | UTF-8 | 813 | 3.5625 | 4 | [] | no_license | --------user1_table--------
create table users1 (
users1_id serial primary key,
is_admin boolean default false,
username varchar(250) unique,
password varchar(250),
therapist varchar(250),
firstName varchar(250),
lastName varchar(250)
)
insert into users1
(is_admin, username, password, ther... | true |
a0117073c9323e387922dfd6b2905f6788ff63fe | SQL | UMNLibraries/experts_dw | /views/pure-person-pure-org.sql | UTF-8 | 1,173 | 3.65625 | 4 | [] | no_license | -- DEPENDS ON:
-- -- unified_pure_json
-- DEPENDENTS:
-- no views
-- REFRESH TIME (tst): 293s
-- REFRESH TIME (prd): 351s
-- RUN ORDER: 9
DROP MATERIALIZED VIEW jsonview_person_pure_org; COMMIT;
CREATE MATERIALIZED VIEW jsonview_person_pure_org
BUILD DEFERRED
REFRESH ON DEMAND
AS
SELECT
uuid AS person_uuid,
... | true |
b2b4c88951a7580bc2d1ab0237a32522dab8ddf5 | SQL | githubjasmine/SQL_Collection | /LeetCode/1667_Fix_Names_in_a_Table.sql | UTF-8 | 319 | 3.0625 | 3 | [] | no_license | -- https://leetcode.com/problems/fix-names-in-a-table/
SELECT user_id, CONCAT(UPPER(LEFT(name,1)),
LOWER(SUBSTR(name,2,LENGTH(name)))) name
FROM users
ORDER BY 1
-- CONCAT("A","B") = "AB"
-- in SUBSTR(), if you want to sub till the end of the str,
-- there's no need to specify the end point
| true |
65ae4ecd4f5c7449abff1782c874921a981488ef | SQL | ShehanPerera/University-Managment-System | /db/student.sql | UTF-8 | 59,202 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 14, 2017 at 07:13 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
8c936cf366fc66c15b51e6188ec95a2ed3daa10d | SQL | jackcwebb98/personalproject | /db/checkPlate.sql | UTF-8 | 240 | 3.09375 | 3 | [] | no_license | select users.real_name, users.car_make, users.plate_number, users.company_id, company.company_name, users.user_id
from users
inner join company on users.company_id = company.company_id
where users.plate_number = $1 and users.company_id = $2 | true |
4c9c3f207d8e85609c38fd6edfb93107b22f28f6 | SQL | silence0201/purchase2 | /purchase.sql | UTF-8 | 16,174 | 3.390625 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4499
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: localhost (MySQL 5.5.42)
# Database: purchase
# Generation Time: 2016-05-17 13:00:54 +0000
# **********************************************... | true |
3e99136335a95cfeb4ebfd0f3374502dc75e6c56 | SQL | vchaillo/piscine_PHP | /d05/ex03/ex03.sql | UTF-8 | 190 | 2.671875 | 3 | [] | no_license | INSERT INTO ft_table (login, groupe, date_de_creation) (
SELECT nom, "other", date_naissance
FROM fiche_personne
WHERE nom LIKE "%a%" AND CHAR_LENGTH(nom) < 9
ORDER BY nom limit 10);
| true |
d611bee0c86cf19b42263a68d1feb8cd9ba06f35 | SQL | netspective/sparx-2001 | /cura/WEB-INF/schema/ddl/oracle.sql | UTF-8 | 87,863 | 3.015625 | 3 | [] | no_license |
create table Record_Status
(
id number(8),
caption varchar(96),
abbrev varchar(32)
);
create unique index Record_Status_abbrev_unq on Record_Status(abbrev);
alter table Record_Status modify (id constraint Record_Status_id_REQ NOT NULL);
alter table Record_Status modify (caption constraint Record_Status_caption_REQ... | true |
ecfeb97fc9b55176d168a47107c2777e222ec241 | SQL | zephyr91/sce | /sql/sce_database.sql | UTF-8 | 680 | 2.71875 | 3 | [] | no_license | set lc_time_names = 'pt_BR';
create database sce default character set utf8 default collate utf8_general_ci;
use sce;
/* Criação do user core */
create user 'core'@'localhost';
set password for 'core'@'localhost' = password('core');
grant all privileges on sce.* to 'core'@'localhost';
/* Criação do user guest */
cre... | true |
0622bd37333fa671c30a2b25b0abfdcbb1ce1ef4 | SQL | Qmando/484-P4 | /testSQL/selectTest.sql | UTF-8 | 3,005 | 3.671875 | 4 | [] | no_license |
CREATE TABLE DA (serial INTEGER, ikey INTEGER, filler CHAR(80), dkey DOUBLE);
CREATE TABLE DB (serial INTEGER, ikey INTEGER, filler CHAR(80), dkey DOUBLE);
-- load 100 tuples into the DA table
INSERT INTO DA (serial, ikey, filler, dkey) VALUES (0, 100, '00000 string record', 0.0);
INSERT INTO DA (serial, ikey, fille... | true |
695ce03223b2a9d5cc50dca49794a376fc05e87a | SQL | aspicas/Lego | /Scripts/FUNCIONES/calcular_fecha.sql | UTF-8 | 287 | 2.53125 | 3 | [] | no_license | create or replace function calcular_edad(d_fecha in date) return number is
n_retorno number := 0;
begin
select trunc((sysdate - to_date(d_fecha,'dd/mm/rrrr'))/365,0) into n_retorno from dual;
return n_retorno;
end;
/
SELECT calcular_edad(TO_DATE('04/06/1993','dd/mm/yyyy')) from dual; | true |
5350d67b66a221638e3781bb702c4df76e83c086 | SQL | YuriiTrofimenko/SpringBookStore_v1 | /spring_book_store_2.sql | UTF-8 | 5,982 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.15.7
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3306
-- Время создания: Сен 30 2016 г., 15:41
-- Версия сервера: 5.5.50
-- Версия PHP: 5.4.45
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... | true |
5aaa9811fe1fb5877a68e205df3f412ae3b7fce3 | SQL | valar-m0rghulis/Python | /Infosys-Foundation-Program/Projects/Module_2_Project/instadb.sql | UTF-8 | 998 | 3.71875 | 4 | [] | no_license | drop table users cascade constraints;
drop table photos cascade constraints;
drop table tags cascade constraints;
drop table photo_caption cascade constraints;
drop table photo_tag cascade constraints;
drop table likes cascade constraints;
CREATE TABLE users(
userid NUMBER NOT NULL PRIMARY KEY,
username VARCHAR(15) NO... | true |
b73523610d3c875bfabd94abf806feff3614b9ff | SQL | acidicph/where-cycle | /src/postGIS_tables/statistics/citibike.sql | UTF-8 | 751 | 4.34375 | 4 | [
"MIT"
] | permissive | -- Aggregate Citibike visits by taxi zone
-- and estimate monthly station additions with rolling maximum
DROP TABLE IF EXISTS statistics.citibike;
CREATE TABLE statistics.citibike AS
SELECT
t.month,
t.zone_id,
MAX(active_stations) OVER (
PARTITION BY t.zone_id
ORDER... | true |
c99e087a0c077fb24c40b1a000fde936e293e641 | SQL | JolverQuevedo/multi_bkp | /SCRIPTS/CREA TABLA COSTEO.sql | UTF-8 | 882 | 3.265625 | 3 | [] | no_license | --DROP TABLE COSTEO
create table COSTEO (
[ID] CHAR(10) NOT NULL ,
ALMA CHAR(4) NOT NULL DEFAULT '',
CTD CHAR(2) NOT NULL DEFAULT '',
NUMDOC CHAR(11) NOT NULL,
ITEM CHAR(4) NOT NULL DEFAULT '0001',
CODIGO CHAR(25) NOT NULL,
LIN CHAR(2) NOT NULL DEFAULT '01',
PO CHAR(25) NOT NULL,
COLOR VARCHAR(30) NOT NULL DEFAU... | true |
0d739d30682ed2a1038dc34109e7306fc07621ed | SQL | FatemehRaoufi/T-SQL | /ExersieCombination.sql | UTF-8 | 1,306 | 4.125 | 4 | [] | no_license | ----تمرین 1
select distinct cc.customerid from Customers cc
inner join orders oo
on cc.CustomerID=oo.CustomerID
where cc.customerid not in (select distinct c.customerid from Customers c
inner join orders o on c.CustomerID=o.CustomerID
where o.OrderID in (select orderid from [Order Details]
group by orderi... | true |
292e6517b4f7a6028a6644d7be952ba9bbdcaafd | SQL | batego/db_fintra | /selectrik/opav/Tables/opav.subclientes_eca.sql | UTF-8 | 740 | 2.625 | 3 | [] | no_license | -- Table: opav.subclientes_eca
-- DROP TABLE opav.subclientes_eca;
CREATE TABLE opav.subclientes_eca
(
id_subcliente character varying(10) NOT NULL DEFAULT ''::character varying,
id_cliente_padre character varying(10) DEFAULT ''::character varying,
user_update character varying(10) DEFAULT ''::character... | true |
3aeed05f10b159606a3285f30f32ea69e5ff3ad8 | SQL | stuartses/holbertonschool-higher_level_programming | /0x0D-SQL_introduction/102-top_city.sql | UTF-8 | 260 | 4.03125 | 4 | [] | no_license | -- Temperatures #0
-- List AVG temperatures GRUOP by city for 7 and 8 months. Order By Top temperatures and show the first Three
SELECT city, AVG(value) AS 'avg_temp' FROM temperatures WHERE month = 7 OR month = 8 GROUP BY city ORDER BY avg_temp DESC LIMIT 3;
| true |
73af59c7fbcfbc18eb3be4804238ee77ffca370f | SQL | lol768/tabula | /config/scripts/schema/migrations/2017-02-08 - add usercode to feedback.sql | UTF-8 | 1,297 | 3.484375 | 3 | [
"ISC"
] | permissive | -- TAB-4838
-- Remove not null constraints on Uni ID - it is now optional
ALTER TABLE FEEDBACK MODIFY (UNIVERSITYID NULL);
ALTER TABLE SUBMISSION MODIFY (UNIVERSITYID NULL);
ALTER TABLE EXTENSION MODIFY (UNIVERSITYID NULL);
-- Increase the size of Notification University ID
ALTER TABLE NOTIFICATION MODIFY (RECIPIENTU... | true |
c56ec63a38bb27213841dea69788830286eb2fd3 | SQL | OMR5221/SQLExamples | /SQL Examples/TCS-12896/create_map_tables_1.sql | UTF-8 | 5,773 | 3.59375 | 4 | [] | no_license | timing start map_table_load;
DROP TABLE APPSUPPORT.TSP###_#_ec_prelim;
CREATE TABLE APPSUPPORT.TSP###_#_ec_prelim AS
SELECT *
FROM
(
SELECT
ec.feed_id,
af.covered_entity_system_id hospital_id,
edi_###_claim_id id,
freedom.tableoid('?') table_oid,
--account_number bad_claim_ref_num,
substr(account_number,#,... | true |
b9a35f0465bbf16cfd2b2af22c288ae1b46f3443 | SQL | AtlasOfLivingAustralia/seasonal-calendar | /seasonal-calendar-api/src/main/resources/db/migration/V201808282350060855__initial.sql | UTF-8 | 1,711 | 3.96875 | 4 | [] | no_license | /*
Add as-idempotent-as-possible DDL statements here
See: http://www.jeremyjarrell.com/using-flyway-db-with-distributed-version-control/
*/
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
DROP TABLE IF EXISTS calendar;
CREATE TABLE calendar(
collection_uuid uuid,
website text,
youtube_id text,
organisation_name te... | true |
ac04d8ae88389e256a03ce7d3f6088af7c187069 | SQL | OHDSI/WebAPI | /src/main/resources/db/migration/sqlserver/V2.8.0.20200724121114__daimon-priority-public.sql | UTF-8 | 310 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | INSERT INTO ${ohdsiSchema}.sec_role_permission(id, role_id, permission_id)
SELECT NEXT VALUE FOR ${ohdsiSchema}.sec_role_permission_sequence, sr.id, sp.id
FROM ${ohdsiSchema}.sec_permission SP, ${ohdsiSchema}.sec_role sr
WHERE sp.value IN (
'source:daimon:priority:get'
) AND sr.name IN ('public'); | true |
24befcbe33348c3acbde49c035130a966931adfa | SQL | ShamimsJava/plsql | /exception1.sql | UTF-8 | 400 | 3.1875 | 3 | [] | no_license | declare
c_id customers.id%type := 8;
c_name customers.name%type;
c_sal customers.salary%type;
begin
select name, salary into c_name, c_sal
from customers
where id = c_id;
dbms_output.put_line('Name: '||c_name);
dbms_output.put_line('Salary: '||c_sal);
exception
when no_data_found then
dbms_output.put_line('... | true |
2e660be170ac267ad8385aaabc3f57ff1c16fe56 | SQL | sharonanna/JATOS | /modules/common/conf/evolutions/default/12.sql | UTF-8 | 441 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | # --- Add column 'authMethod' and rename email to 'username' in User table
# --- !Ups
ALTER TABLE `User` CHANGE `email` `username` varchar(255) NOT NULL;
ALTER TABLE `StudyUserMap` CHANGE `user_email` `user_username` varchar(255) NOT NULL;
ALTER TABLE `User_roleList` CHANGE `User_email` `User_username` varchar(255) NO... | true |
0960bab5e8173af074c2b7924322400e10815c4f | SQL | papijhonn/certificados-1 | /protected/data/certificados[1].sql | UTF-8 | 8,858 | 3.703125 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
DROP SCHEMA IF EXISTS `CERTIFICADOS` ;
CREATE SCHEMA IF NOT EXISTS `CERTIFICADOS` DEFAULT CHARACTER SET latin1 COLLA... | true |
61284b1d6a8f71ac06537817f8c69a801d35c8b8 | SQL | vhalbert/modeshape | /sequencers/modeshape-sequencer-ddl/src/test/resources/ddl/table_definition.ddl | UTF-8 | 8,880 | 3.5625 | 4 | [
"Apache-2.0"
] | permissive | -- ==================================================================
-- SQL 92 TEST DDL
--
-- Barry LaFond 9/22/2009
-- ==================================================================
-- ==================================================================
-- TABLE DEFINITION
-- =======================... | true |
3d562df50e8313dcc4a2dfb0a1a47279cab8fe91 | SQL | SBorghesani/rare-server-sneaky-sneks | /rare.sql | UTF-8 | 5,679 | 3.640625 | 4 | [] | no_license | CREATE TABLE "Users" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"first_name" varchar,
"last_name" varchar,
"email" varchar,
"bio" varchar,
"username" varchar,
"password" varchar,
"profile_image_url" varchar,
"created_on" date,
"active" bit
);
CREATE TABLE "DemotionQueue" (
"ac... | true |
e863e4d22fbf205e50be77be2a180d96f6ae8b33 | SQL | Kalpeshk9967016292/CT | /SQL/tofq.sql | UTF-8 | 1,095 | 2.625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 11, 2015 at 05:34 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
3004e70c2c4f0b18eb7c7c2872490737e5a407ae | SQL | KennyCrump/personal-project | /db/get_user_profile.sql | UTF-8 | 293 | 3.671875 | 4 | [] | no_license | select appt.*, date, TO_CHAR(time, 'hh12:mi AM') as time_formatted, blocked, user_name, email, picture from users
LEFT JOIN appointments appt on appt.user_id = users.user_id
LEFT JOIN time_slot on time_slot.slot_id = appt.slot_id
where users.user_id = ${user_id}
order by date DESC, time DESC | true |
c6d3015e18459be31abb810d3f859c2a41f7f1f5 | SQL | Goutam158/spring-security | /spring-security-jdbc/spring-security-jdbc/src/main/resources/schema.sql | UTF-8 | 565 | 3.3125 | 3 | [] | no_license |
drop table if exists authorities_new;
drop table if exists users_new;
create table users_new(
username varchar_ignorecase(50) not null primary key,
password varchar_ignorecase(50) not null,
enabled boolean not null);
create table authorities_new (
username varchar_ignorecase(50) not n... | true |
aea4c4eb4d205363c747b8c194b0ee3aa6355a4c | SQL | Jokero/diplom | /server/db.sql | UTF-8 | 16,926 | 3.921875 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
CREATE SCHEMA IF NOT EXISTS `WorldMap` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
USE `WorldMap` ;
-- -----------------------... | true |
c296604771e9af5d29f8dc83e22b63821d7548ce | SQL | salilkar/liquiMySql | /liqui-demo/src/main/resources/Rision/DataBase/ManagingDBScripts/rision-Main/DDL/1.0.0/1.0.0.1/03_M337_SP_GetCandidatesHireDetail.sql | UTF-8 | 4,583 | 4.0625 | 4 | [] | no_license |
DROP PROCEDURE IF EXISTS `GetCandidatesHireDetail`;
DELIMITER |
CREATE PROCEDURE `GetCandidatesHireDetail`(
in businessSite_Id bigint(20)
,in department_Id bigint(20)
,in subClassification_Id bigint(20)
,in language_Id bigint(20)
,in start_Date date
,in end_Date date
,in manager_Id bigint(20)
)
BEGIN
/*
Autho... | true |
424335a2d5fbe08e3692ef7a7a57238a27493f62 | SQL | cloudtestsoftware/biderp | /src/com/biderp/sql/oracle/Taskresource/Update_Taskresource.sql | UTF-8 | 682 | 2.9375 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE Update_Taskresource(pnObjid NUMBER) IS
--Constants for status
STATUS_OPEN varchar2(20):='1';
STATUS_ACCEPTED varchar2(20):='2';
BEGIN
Begin
Update Table_Taskresource set moduser=moduser
where objid=pnObjid;
EXCEPTION
WHEN NO_DATA_FOUND THEN
null;
End;
--Set all relation p... | true |
d0ad6ead7cce756e899ad5f090a5e05664d2cee2 | SQL | bellmit/researchmeng2 | /derby/467793_DERBY-1377/to/bestrowidentifier.sql | UTF-8 | 5,189 | 3.65625 | 4 | [] | no_license | --
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "Lice... | true |
c4f94fe8d9c3a471c765e4dd9be113df6a3ae40d | SQL | Nirvana16/gestao-festa-SpringSecurity | /src/main/resources/import.sql | UTF-8 | 1,729 | 2.515625 | 3 | [] | no_license | insert into usuario (id, nome, login, senha, ativo) values (1, 'Danilao da Motossera', 'danilo',
'$2a$10$OTX8Z7VX7g1a3Way2H4kYOHe2EYOGjJsgWTql.0dZoWjQ6u4oBJfW', true);
insert into usuario (id, nome, login, senha, ativo) values (2, 'Higor Hermes', 'higor',
'$2a$10$OTX8Z7VX7g1a3Way2H4kYOHe2EYOGjJsgWTql.0dZoWjQ6u4oBJfW'... | true |
6867785ab024035b0becef6cc0b5a0282523eb1c | SQL | diiina/database_course | /Kozharin Aleksei/homework4/ppu.sql | UTF-8 | 508 | 4 | 4 | [] | no_license | # PPU
WITH RECURSIVE cte AS
(
SELECT MIN(CAST(payment_dttm AS DATE)) AS dt FROM payments
UNION ALL
SELECT dt + INTERVAL 1 DAY
FROM cte
WHERE dt + INTERVAL 1 DAY <= (SELECT MAX(CAST(payment_dttm AS DATE)) FROM payments)
)
SELECT cte.dt, COUNT(DISTINCT payments.user_id)/COUNT(DISTINCT sessions.use... | true |
210f905d137f08bffb27034077f7f69b5df90b32 | SQL | sebrown0/SUK | /database/pension/sql/procedures/pCreate_All_Enrolment_Type_Data.sql | UTF-8 | 767 | 3.421875 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `create_all_enrolment_type_data`()
BEGIN
DROP TABLE IF EXISTS temp_all_enrolment_type_data;
CREATE TEMPORARY TABLE temp_all_enrolment_type_data
SELECT
e_type.id AS type_id, e_type.enrolment_criteria_tax_year AS tax_year, e_type.enrolment_description,
criteria.is_n... | true |
86af621deac1e5710805dfd32e7cf618e51d4e75 | SQL | wildrider09/GetThrough_App | /Sql_Files/users.sql | UTF-8 | 2,226 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: fdb19.awardspace.net
-- Generation Time: Apr 13, 2018 at 03:47 PM
-- Server version: 5.7.20-log
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... | true |
ef03388e630ef918e26162ebb040b527bbb43c40 | SQL | Stanislav-vsv/SSVD | /C3639375.ССВД.EDSC_META.Основной патч/db_scripts/EDSC_META@bi2db5/DCT_REGLAMENTTYPES.sql | WINDOWS-1251 | 1,922 | 3.421875 | 3 | [] | no_license | begin
execute immediate 'drop table DCT_REGLAMENTTYPES CASCADE CONSTRAINTS ';
exception when others
then null;
end;
/
CREATE TABLE DCT_REGLAMENTTYPES
(
REGLAMENTTYPE_CODE VARCHAR2(25 BYTE) NOT NULL,
REGLAMENTTYPE_NAME VARCHAR2(255 BYTE) NOT NULL,
REGLAMENTTYPE_DESC VARCHAR2(512 BYT... | true |
4bfd4f27369e3e09773c55f8cd687a993b372a3a | SQL | lnbe10/SQL-for-Data-Science | /week_4_coding_assigment.sql | UTF-8 | 2,732 | 4.15625 | 4 | [] | no_license | --1) Pull a list of customer ids with the customer’s full name, and address, along with combining their city and country together. Be sure to make a space in between these two and make it UPPER CASE. (e.g. LOS ANGELES USA)
SELECT CustomerId, UPPER(FirstName|| ' '|| LastName), UPPER(City || ", "|| Country)
FROM Custome... | true |
40bb3e94ede9fc9ead178a66be2d58a6477e0eaf | SQL | complitex/complitex | /osznconnection/osznconnection-db/update/0.1/20120213_725_0.1.21.sql | UTF-8 | 3,197 | 3.265625 | 3 | [] | no_license | -- Script changes organization data structure: calculation center now has mandatory reference to jdbc data source
-- that will be used to establish connection to that calculation center when it needs to process files.
-- All calculation center organizations will have 'jdbc/osznconnection_remote_resource' jdbc data sour... | true |
da5ec6b4930c3b5ecb899b12aa36b28fbb36545c | SQL | alshamiri5/marketing-analytics | /telemetry/dailyADI/dailyADI.sql | UTF-8 | 606 | 3.265625 | 3 | [] | no_license | -- This is for the daily ADI data
-- query link: https://sql.telemetry.mozilla.org/queries/59575/source for ADI Data (runs once every 24hrs)
-- You need to contact Jason Thomas for access to vertica data source (the actual query in telemetry listed below)
SELECT bl_date AS date,
SUM(tot_requests_on_date) ... | true |
dae1ced58d7c62abbf628e52b6ec343eb0d41939 | SQL | iclavijos/msdb | /src/main/resources/db/migration/V0_11__More_points_management.sql | UTF-8 | 3,029 | 4.28125 | 4 | [] | no_license | create or replace view drivers_classification_series as
select d.id driverId, concat(d.name, ' ', d.surname) driverName, sum(points) points, series_edition_id seriesId
from driver_event_points dep, event_session es, event_edition ee, driver d
where dep.session_id = es.id and es.event_edition_id = ee.id and dep.driver_i... | true |
45f155473eed90561ad663fade53323c028eba91 | SQL | Iuzziel/P02-langage-PHP-objet | /sql/base personne.sql | UTF-8 | 1,824 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Mer 04 Juin 2014 à 15:02
-- Version du serveur: 5.5.24-log
-- Version de PHP: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
0be53ef6afc7e352cc7b344ea3a287f56abdd96a | SQL | miths1108/PiGen | /codd-data-gen/resources/cdgclient/postgres/projection queries/q224.sql | UTF-8 | 305 | 3.015625 | 3 | [] | no_license | select distinct c_last_name, c_first_name, s_store_name, s_state, i_color, i_current_price, i_manager_id, i_units, i_size
from store_sales, store, item, customer
where ss_customer_sk = c_customer_sk
and ss_item_sk = i_item_sk
and ss_store_sk = s_store_sk
and s_market_id = 8
and i_color = 'coral'
;
| true |
61834a573712aedb17e9b6b5df57044cbe6961ee | SQL | genepattern/genepattern-server | /website/WEB-INF/schema/analysis_hypersonic-3.9.0.sql | UTF-8 | 1,730 | 3.1875 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | create table job_output (
gp_job_no integer not null,
path varchar(255) not null,
file_length bigint,
last_modified timestamp,
extension varchar(255),
kind varchar(255),
gpFileType varchar(255),
hidden bit not null,
deleted bit not null,
primary key (gp_job_no, path),
constr... | true |
875e8b0bb13412c94400b996f9a43683527b0c3c | SQL | andrespp/ds-capes-pos | /sql/ufpa_ppgee_docentes.sql | UTF-8 | 227 | 2.71875 | 3 | [] | no_license | SELECT DISTINCT
ID_PESSOA
,NM_DOCENTE
,AN_BASE
,CD_CAT_BOLSA_PRODUTIVIDADE
FROM FATO_DOCENTE
WHERE
SG_ENTIDADE_ENSINO = 'UFPA'
AND NM_PROGRAMA_IES = 'ENGENHARIA ELÉTRICA'
AND AN_BASE = 2016
ORDER BY NM_DOCENTE ASC
| true |
2ac93b458d4c90a3be699db80d87421d2b92548f | SQL | Reynau/twu-biblioteca-sql | /q2.sql | UTF-8 | 128 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | SELECT COUNT(*)
FROM member
LEFT JOIN checkout_item ON checkout_item.member_id = member.id
WHERE checkout_item.member_id IS NULL | true |
b11cbca3f7fb37dbbf8f2b2fbd88331fa4910bd6 | SQL | jyk4100/aws | /aws-de/RDS_RedShift_setup.sql | UTF-8 | 1,132 | 3.296875 | 3 | [] | no_license | -- AWS data engineering study
-- jyk4100
-- last modified: 2021-05-30
-- section2
-- RDS (MySQL) and RedShift set up for lab/exercies
show databases;
use ecommerce_db;
show tables;
-- create_table_commands.sql: need to add line breaks;
-- beekeeper can't save file
-- sqlworkbench port format... and freeze with bulk i... | true |
2750f3f06671d6a263860137dba5a6b7c97c3c7b | SQL | Renascentinc/retina-api | /sql/types/configurable-item-type.sql | UTF-8 | 297 | 2.984375 | 3 | [] | no_license | DO $$
BEGIN
-- IF NOT EXITS logic pulled from https://levlaz.org/types-and-roles-if-not-exists-in-postgresql
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'configurable_item_type') THEN
CREATE TYPE configurable_item_type AS ENUM ('BRAND', 'PURCHASED_FROM', 'TYPE');
END IF;
END $$;
| true |
250967ca8255599e4fa145d39823cffc9424a1a1 | SQL | gdabli/Music-Store-Website | /database/test.sql | UTF-8 | 116 | 2.703125 | 3 | [] | no_license | select * from invoice i, lineitem l, product p
where i.invoice_id = l.invoice_id
and l.product_id = p.product_id; | true |
2117df30811e26dae5b3d8b4515faece247adc63 | SQL | Suroviydron/MySQL | /Задание 5.2.sql | WINDOWS-1251 | 841 | 3.484375 | 3 | [] | no_license | /* users . created_at updated_at VARCHAR
"20.10.2017 8:10". DATETIME, . */
drop database if exists homework;
create database homework;
use homework;
drop table if exists task5;
create table task5(
created_at varchar(20),
updated_at varchar(20)
)
insert into task5 values ('20.10.2017 8:10',... | true |
bdcbf7101a5a623ffdbe95a7155914e93acfca41 | SQL | radtek/Telecommunication | /GSM/DataBase/dealers/ADMIN_DELIVERY_TYPE_LIST.sql | WINDOWS-1251 | 3,858 | 3.578125 | 4 | [] | no_license | CREATE OR REPLACE PROCEDURE WWW_DEALER.ADMIN_DELIVERY_TYPE_LIST(
SESSION_ID IN VARCHAR2 DEFAULT NULL,
pORDER_BY IN VARCHAR2 DEFAULT 'DELIVERY_NAME ASC',
DO_DELETE IN VARCHAR2 DEFAULT NULL,
pID IN INTEGER DEFAULT NULL
) IS
--
--#Version=1
--
I PLS_INTEGER := 0;
vHREF VARCHAR2(4000 CHAR);
vTEMP VARCHAR2(40... | true |
a92935be4933b0601025ea0b8a3521253d5be7ea | SQL | npt05/C0321G1_NguyenPhucTai_Module3 | /bai5_sql_view_index_stored_procedure/thuc_hanh/view_in_SQL.sql | UTF-8 | 324 | 3.359375 | 3 | [] | no_license | use classicmodels;
create view customer_view as
select customerNumber, customerName, phone
from customers;
select * from customer_view;
CREATE OR REPLACE VIEW customer_view AS
SELECT customerNumber, customerName, contactFirstName, contactLastName, phone
FROM customers
WHERE city = 'Nantes';
DROP VIEW customer_vi... | true |
1278a7657999328cd241e4360a119da94e216138 | SQL | null-reaper/grocery-store-app | /Code/SQL/Relational-Schema.sql | UTF-8 | 3,638 | 4.15625 | 4 | [] | no_license | -- Tables
-- Strong Entities
create table users (
uid char(5),
uname varchar(20) unique,
upass varchar(20),
primary key(uid)
);
create index uidx on users(uid);
create table customer(
cid char(5),
fname varchar(10) not null,
lname varchar(10) not null,
balance numeric(10,2) default 0... | true |
a90631910c4992c0a3f4d7a79670d2bf36d277e5 | SQL | pertanh/kompetenser | /Script/employment.sql | UTF-8 | 923 | 3.140625 | 3 | [] | no_license | CREATE TABLE `kompetenser`.`EMPLOYMENT` (
`ID` INT NOT NULL AUTO_INCREMENT,
`EMPLOYMENT_DATE` DATETIME NULL,
`EMPLOYMENT_END_DATE` DATETIME NULL,
`USERACCOUNT_ID` INT NULL,
`COMPANY_ID` INT NULL,
PRIMARY KEY (`ID`),
INDEX `COMPANY_ID_FK_idx` (`COMPANY_ID` ASC) VISIBLE,
INDEX `USERACCOUNT_ID_FK_idx` (`US... | true |
80dc603f54ffd9ff2aa30a4914d09d614673e31d | SQL | alextunyk/sqlpatch | /examples/sc4/src/ObjectTypes.sql | UTF-8 | 1,642 | 3.609375 | 4 | [] | no_license |
CREATE TABLE [ObjectTypes] (
[ObjectTypeKey] SMALLINT IDENTITY (1, 1) NOT NULL,
[ObjectTypeID] UNIQUEIDENTIFIER CONSTRAINT [DF_ObjectTypes_ObjectTypeID] DEFAULT (newid()) ROWGUIDCOL NOT NULL,
[ObjectTypeName] NVARCHAR (100) NOT NULL,
[ObjectTypeDescription] NVARCHAR (M... | true |
cfdcb81d6880b205cec0c45d5181179dd6e3342d | SQL | ssezerer/Data-Science | /DAwithSQL/SQL_files/week7_agenda.sql | WINDOWS-1250 | 5,123 | 4.96875 | 5 | [] | no_license | --1. Find the customers who placed at least two orders per year.
alter view view1 as
select distinct customer_id, year(order_date) as orderdate,
count(order_id) over (partition by customer_id, year(order_date) order by customer_id) as num_of_order
from [sales].[orders]
select customer_id, orderdate, num_of_order
from... | true |
5133a5784bbbd2f731a021800d7d4077dc7fea21 | SQL | bilaliqbal1/phpprojects | /pharmacy/pharmacy.sql | UTF-8 | 11,502 | 3.125 | 3 | [] | no_license |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
--
--
-- -------... | true |
93313f0d61b9fd5c5b4763213e8b2403f8855404 | SQL | mekapeu/holbertonschool-higher_level_programming | /0x0D-SQL_introduction/16-no_link.sql | UTF-8 | 231 | 3.3125 | 3 | [] | no_license | -- Lists all records in the table second_table of the current database.
-- Result should display the score and the name, ordered by score.
SELECT `score`, `name` FROM `second_table` WHERE `name` IS NOT NULL ORDER BY `score` DESC;
| true |
40d4195f32e457c7a01e4a92e3fd7778a6904e99 | SQL | hnybom/low-code-vs-code | /src/main/resources/db/migration/V1.2__create_high_score_table.sql | UTF-8 | 255 | 3.40625 | 3 | [] | no_license | CREATE TABLE high_scores (
id serial,
gamer_name VARCHAR(128) NOT NULL,
score INTEGER NOT NULL,
created TIMESTAMP NOT NULL,
game_id INTEGER REFERENCES games,
PRIMARY KEY(id)
);
create index high_scores_game_id_idx on high_scores (game_id); | true |
aef911e9df328ae5d7d78df1f304cc1d7a6354f8 | SQL | raghavaallianceit/databasebackup | /test/CX_CVCIQ_V3/Procedures/BIQ_DETAILED_UNIQUE_REPORT.sql | UTF-8 | 6,698 | 3.171875 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE cx_cvciq_v3.biq_detailed_unique_report (
out_chr_err_code OUT VARCHAR2,
out_chr_err_msg OUT VARCHAR2,
out_tab OUT return_unique_arr,
in_from_date IN VARCHAR2,
in_to_date IN ... | true |
15f7a06601119b05c49940a3ef9f94d04559e8b5 | SQL | ojashwibhatt23/online-examination | /online_exam/exam.sql | UTF-8 | 10,116 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 22, 2021 at 10:50 AM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.2.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.