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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d5b4f35b7cb0bacd5fc565d11d389d8185dcd073 | SQL | nauval123/sppk-saw | /sppk jilid 2.sql | UTF-8 | 8,835 | 3.015625 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50505
Source Host : localhost:3306
Source Database : sppk
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2021-06-14 00:57:12
*/
SET FOREIGN_KEY_CHE... | true |
c9f777175b05b0992a13e67a85d16b8c24b1ae42 | SQL | reisritter/turma11java | /bd/mysql/ex3.sql | UTF-8 | 3,426 | 3.96875 | 4 | [] | no_license | drop database if exists db_cidade_das_carnes;
create database if not exists db_cidade_das_carnes;
use db_cidade_das_carnes;
create table if not exists tb_categoria
(
id int primary key auto_increment,
nome varchar(255)
);
create table if not exists tb_produto
(
id int primary key auto_increment,
nome varchar... | true |
30f8ba2c1fa86bd2a321b795bc92349750dfe603 | SQL | cckmit/xinfu | /ccms/WebContent/WEB-INF/action/project/fitness/trains/task/detail/resource/insertlog/insert.sql | UTF-8 | 1,137 | 2.921875 | 3 | [] | no_license | INSERT INTO et_course_log(
tuid,
course_staff_id,
courseid,
classid,
status,
currentsecond,
createdby,
created,
updatedby,
updated,
course_skill_id,
skill_id,
user_id,
userlogin
)VALUES(
${seq:nextval@seq_et_cour... | true |
bb0ba65c2112949d0adb5c62d62964e2df8cd629 | SQL | MikeColetta/Employee-Tracker | /db/schema.sql | UTF-8 | 532 | 3.546875 | 4 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS employeeTracker_DB;
CREATE DATABASE employeeTracker_DB;
USE employeeTracker_DB;
CREATE TABLE employee(
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
role_id INT NULL,
manager_id INT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role(
id ... | true |
43fbbc58d862f788beb2619b8554c8be0d3dbeee | SQL | meredith-cat/shop_inventory | /db/potion_shop.sql | UTF-8 | 578 | 3.671875 | 4 | [] | no_license | -- This file creates the tables within the database
DROP TABLE IF EXISTS potions;
DROP TABLE IF EXISTS types;
DROP TABLE IF EXISTS makers;
CREATE TABLE types(
id SERIAL PRIMARY KEY,
name VARCHAR(255)
);
CREATE TABLE makers(
id SERIAL PRIMARY KEY,
name VARCHAR(255),
evil INT,
certified BOOLEAN
);
CREATE T... | true |
0e50ddf7fa6ca08668e8cff63c503452ac4c61d3 | SQL | Matias1542/blog_perifericos_pc | /db/bdblog.sql | UTF-8 | 2,026 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 19-11-2021 a las 12:43:26
-- Versión del servidor: 10.4.19-MariaDB
-- Versión de PHP: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
204777c2409dfd9d2f9deb8c0a90f0ead8b47e7e | SQL | deadlooc/BookDB | /struct.sql | UTF-8 | 892 | 3.40625 | 3 | [] | no_license | PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE "author" ("author_id" INTEGER PRIMARY KEY AUTOINCREMENT, "name" TEXT);
CREATE TABLE "book" ("book_id" INTEGER PRIMARY KEY AUTOINCREMENT, "name" TEXT);
CREATE TABLE "book_copy" ("publication_id" INTEGER REFERENCES "book_publication" ("publication_id") ON DELETE RE... | true |
eb62ae2904a79018ab2876911ca073c8c982961c | SQL | TwoEyedHuman/nflPredictions | /method1_probs.sql | UTF-8 | 1,599 | 2.53125 | 3 | [] | no_license | drop table if exists method1_probs;
create table method1_probs (
team char(3),
score decimal(10, 1),
primary key (team)
);
insert into method1_probs values ('HOU',0.7);
insert into method1_probs values ('CHI',0.2);
insert into method1_probs values ('CLE',0.2);
insert into method1_probs values ('GB',0.8);
ins... | true |
afdee63a6c1ec96211aa56746ab3ec1eb4bc360c | SQL | harumochi/checkout03 | /models/NoOfPVs_CurPC.sql | UTF-8 | 559 | 4.21875 | 4 | [] | no_license | With CPC as (
With Cur_PC_id as (select id, max(pageview_datetime) as max_date_time
from users_extract01.postcode_history
group by id)
select a.id, b.postcode, max_date_time from
Cur_PC_id as a
Left join users_extract01.postcode_history as b
on a.max_date_... | true |
03f98946dc4fa61c1526fddf40b8045a3e7ea934 | SQL | huberemanuel/ds-introduction | /Aula 1/assets/example.sql | UTF-8 | 419 | 3.34375 | 3 | [] | no_license | /* Script para recriar a base de dados */
CREATE TABLE IF NOT EXISTS users (
user_id INTEGER PRIMARY KEY AUTOINCREMENT,
full_name TEXT,
birth_date TEXT,
children INT
);
INSERT INTO users (full_name, birth_date, children) VALUES
("Lorem Ipsum", "01/01/1997/", 2),
("Ipsum Lorem", "01/02/1897", 7),
("... | true |
f2bc8fb99fee915e65b38a0fdd09f54fb61c5088 | SQL | Miksemaj/mySQLReview | /database/schema.sql | UTF-8 | 221 | 2.734375 | 3 | [] | no_license | DROP DATABASE IF EXISTS fooddb;
CREATE DATABASE fooddb;
USE fooddb;
CREATE TABLE Food (
id int auto_increment not null,
name varchar(255) not null,
price int not null,
rating int not null,
primary key (id)
); | true |
886962012448579a08cc0c1a6bbb0dfc17f25fa5 | SQL | gournilsawant004/SQL | /6.5 CorrelatedSubqEXC.sql | UTF-8 | 240 | 3.234375 | 3 | [] | no_license | SELECT * FROM sql_invoicing.invoices i
WHERE invoice_total >
(SELECT AVG(invoice_total)
FROM invoices
WHERE client_id = i.client_id) -- for each client (this line means it correlated the clientid column in the subq with main query) | true |
0c2456e9ce58bda76e0d784f97a8d23954ecb2fb | SQL | KirilPecev/CSharp-DB-Fundamentals | /02. Databases Basics - Exams/06. Databases MSSQL Server Exam - 24 April 2017/01. DDL.sql | UTF-8 | 1,829 | 3.875 | 4 | [] | no_license | CREATE TABLE Clients
(ClientId INT
PRIMARY KEY IDENTITY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
Phone CHAR(12)
)
CREATE TABLE Mechanics
(MechanicId INT
PRIMARY KEY IDENTITY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
[Address] VARCHAR(255)
)
CREATE TABLE Models
(ModelId INT
PRIMARY KE... | true |
e7b7dbf36e4feb79af9b0493e02f700c7bdb61bf | SQL | caiofior/mementomei.it | /install/data/schema/agency.sql | UTF-8 | 1,174 | 3.03125 | 3 | [] | no_license | CREATE TABLE `agency` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Identificativo',
`type` enum('graveyard','parlour') NOT NULL COMMENT 'Agency type',
`name` varchar(100) NOT NULL COMMENT 'Name',
`description` text COMMENT 'Description',
`main_place` geometry NOT NULL COMMENT 'Point',
`toponym` varchar(2... | true |
365af7b4407a1f98eb9df840aa678480ec2a46e6 | SQL | sibande/tshirtshop-api | /src/db/updates/custom.sql | UTF-8 | 11,272 | 4.21875 | 4 | [] | no_license | -- Change DELIMITER to $$
DELIMITER $$
-- Create tax_get_taxes stored procedure
DROP PROCEDURE IF EXISTS tax_get_taxes $$
CREATE PROCEDURE tax_get_taxes()
BEGIN
SELECT tax_id, tax_type, tax_percentage
FROM tax
ORDER BY tax_id;
END$$
-- Create tax_get_tax_details stored procedure
DROP PROCEDURE IF EXISTS tax_... | true |
ca53d7d1a06c6e442b7afec9ce1f54a16ee9889c | SQL | r2bilisim/cms | /Kurulum/Create_Scripts/Mysql/RANDEVU_AYAR_CR.sql | UTF-8 | 722 | 2.765625 | 3 | [] | no_license | CREATE TABLE RANDEVU_AYAR(
`id` int AUTO_INCREMENT NOT NULL,
`randevuSecimi` tinyint Unsigned NULL,
`minimumTarihSayisi` tinyint Unsigned NULL,
`minimumTarihTuru` nvarchar(1) NULL,
`maksimumTarihSayisi` tinyint Unsigned NULL,
`maksimumTarihTuru` nvarchar(1) NULL,
`takvimTema` nvarchar(50) NULL,
`takvimAnimasyon... | true |
25c4abafb4f06a9f2bfaf670e994d6340e60bbc1 | SQL | Oumar25/CS231 | /Profession.sql | UTF-8 | 761 | 3.921875 | 4 | [] | no_license | DROP TABLE IF EXISTS profession;
CREATE TABLE profession (
profession_ID int(11) NOT NULL auto_increment,
profession VARCHAR(25) NOT NULL,
PRIMARY KEY (profession_ID)
) AS
SELECT DISTINCT profession
FROM my_contacts
WHERE profession IS NOT NULL
ORDER BY profession;
ALTER TABLE my_contacts
ADD COLUMN profess... | true |
05e079f008d12bb2b89dd8af701e58bfc7156daa | SQL | lucasfgs/nestjs-prisma | /prisma/migrations/20211006030915_create_permission/migration.sql | UTF-8 | 908 | 3.75 | 4 | [
"MIT"
] | permissive | -- CreateTable
CREATE TABLE "Permission" (
"id" SERIAL NOT NULL,
"name" VARCHAR(50) NOT NULL,
CONSTRAINT "Permission_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "PermissionRole" (
"id" SERIAL NOT NULL,
"create" BOOLEAN NOT NULL DEFAULT false,
"read" BOOLEAN NOT NULL DEFAULT false,
... | true |
e5045cc98c6879696176ecabd1c287862d83a60d | SQL | bgatev/TelerikAcademy | /Databases/Lection 11/Task4.sql | UTF-8 | 1,017 | 4.1875 | 4 | [] | no_license | //create table
Use test;
CREATE TABLE logs(
id int NOT NULL AUTO_INCREMENT,
date datetime,
text nvarchar(255),
PRIMARY KEY (id, date)
) PARTITION BY RANGE(YEAR(date)) (
PARTITION p0 VALUES LESS THAN (1990),
PARTITION p1 VALUES LESS THAN (2000),
PARTITION p2 VALUES LESS THAN (2010),
PARTITION p3... | true |
766fdf7ce5310d18939969ccb64fb5ee436ea97e | SQL | AlexWooly/ApplicationRecommendationSystem | /src/main/resources/db/migration/V20210308222257__user_info_created.sql | UTF-8 | 1,927 | 3.09375 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : LuckyMoney
Source Server Type : MySQL
Source Server Version : 50728
Source Host : localhost:3306
Source Schema : ars
Target Server Type : MySQL
Target Server Version : 50728
File Encoding : 65001
Date: 08/03/2021 22:22... | true |
aefb9c8436eb538bb59bc4eaea65cc386c15d286 | SQL | SheKei/COMP3000-Computing-Project | /Hourly/MySQL statements/Timetable/get_classes_by_day.sql | UTF-8 | 465 | 3.828125 | 4 | [] | no_license | DELIMITER //
CREATE PROCEDURE COMP3000_STong.get_classes_by_day(IN userID VARCHAR(20))
BEGIN
class.module_code,
module.module_name,
class_id,
class_name,
class_room,
class_day,
start_time,
class_duration
FROM
COMP3000_STong.class,
COMP3000_STong.module
WHERE
class.user_id = userID
AN... | true |
7c2351a2c893cd26e38575460c7f7d4739bcf4a1 | SQL | bretweinraub/bash_profiles | /bdw/sql/etl/prod_dist.sql | UTF-8 | 147 | 2.796875 | 3 | [] | no_license |
select count(*), to_char (created_dt,'YYYYMMDD')
from product
group by to_char (created_dt,'YYYYMMDD')
order by to_char (created_dt,'YYYYMMDD')
/
| true |
ade605c054a95162e37f5f1d6ea7ff48d3f7937a | SQL | AbdulSamad4068/HackerRank-Problem-Solutions | /SQL/Advanced Join/Symmetric Pairs.sql | UTF-8 | 165 | 3.78125 | 4 | [] | no_license | SELECT F1.x, F1.y
FROM FUNCTIONS F1 JOIN FUNCTIONS F2 ON
F1.x = F2.y AND F1.y = F2.x
GROUP BY F1.x, F1.y
HAVING COUNT(F1.x) > 1 OR F1.x < F1.y
ORDER BY F1.x | true |
f64601018d47a3fc95e02aa259157bd9118c6217 | SQL | fabasoad/sma-site | /sma-site-db/src/main/resources/db/mysql/scripts/init.sql | UTF-8 | 2,777 | 3.3125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS SMA_PARAMS (
SP_PROP_NAME VARCHAR(255),
SP_PROP_VALUE VARCHAR(255) NOT NULL,
PRIMARY KEY (SP_PROP_NAME)
);
INSERT IGNORE INTO SMA_PARAMS VALUES ('SMA_MAIN_BODY', '');
INSERT IGNORE INTO SMA_PARAMS VALUES ('SMA_CONTACTS_BODY', '');
INSERT IGNORE INTO SMA_PARAMS VALUES ('SMA_COMPANY_NAME... | true |
4b0715cb1f3a90503186a9de6058c301fc38db11 | SQL | EIVSoftware/ejercicios-java-2019 | /ejercicio-05B-acceso-datos-hikaricp/src/main/resources/import.sql | UTF-8 | 927 | 2.953125 | 3 | [] | no_license | CREATE TABLE provincias (
id INT NOT NULL,
nombre VARCHAR(200) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE localidades (
id INT NOT NULL,
nombre VARCHAR(200) NOT NULL,
provincia_id INT NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO PROVINCIAS (id, nombre) values (1, 'SANTA FE');
INSERT INTO PROVINCIAS (id, no... | true |
2e0d4ecb81a80382d7c8d9364f9982bfe33312b2 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day13/select0252.sql | UTF-8 | 191 | 2.734375 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-12T02:52:00Z' AND timestamp<'2017-11-13T02:52:00Z' AND SENSOR_ID='b295a8ad_0a67_44e2_bbbd_4224be69b00f'
| true |
d45d0fbaefef6ee4db87316eeb5d317dabcba74a | SQL | NCIP/c3pr | /codebase/projects/core/db/SQLServer/csm/1_AuthSchema_create.sql | UTF-8 | 7,996 | 3.234375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | --- Create Tables
CREATE TABLE CSM_APPLICATION (
APPLICATION_ID integer IDENTITY(1,1) NOT NULL,
APPLICATION_NAME varchar(100) NOT NULL,
APPLICATION_DESCRIPTION varchar(200) NOT NULL,
DECLARATIVE_FLAG integer,
ACTIVE_FLAG integer NOT NULL,
UPDATE_DATE datetime,
DATABASE_URL varchar(100),
DATABASE_USER_... | true |
0c9860eb9b4ec1d6af7af212e80b93eb87294c9f | SQL | imaginrywalrus/CIS-560-Project-Final-Version | /MoviesData/SQL/Procedures/ReportQueries/Movies.DeleteMovieDirector.sql | UTF-8 | 173 | 2.609375 | 3 | [] | no_license | CREATE OR ALTER PROCEDURE Movies.DeleteMovieDirector
@DirectorID INT,
@MovieID INT
AS
DELETE Movies.Review
WHERE DirectorID = @DirectorID AND MovieID = @MovieID; | true |
87998dd8af88ea59bc487aaf5c6318d8ba8d411b | SQL | H0RIA/LiliDoctorat | /LCP.sql | UTF-8 | 5,521 | 3.609375 | 4 | [
"MIT"
] | permissive | --SQLite Maestro 14.3.0.6
------------------------------------------
--Host : localhost
--Database : LCP
CREATE TABLE BuildingInfo (
Id blob NOT NULL,
Shape nvarchar(50),
RoomPlacement text,
RoomCount integer,
FrontFloorCount integer,
BackFloorCount ... | true |
f8b484b2b45aa19428b1ffeda29832a0959f7cc8 | SQL | smelike/my_bank | /data.design.sql | UTF-8 | 1,671 | 3.734375 | 4 | [] | no_license | #数据结构设计
use my_account;
# 用户表
create table users (
id int auto_increment primary key,
mobile char(11) not null,
pwd char(32) not null,
created datetime default NOW(),
modified datetime default NOW()
) engine = InnoDB;
# 用户帐户表
create table user_accounts (
id bigint auto_increment primary key,
... | true |
805e66e2665e87e26fe8e8b6189472dec2f47485 | SQL | VyaraGGeorgieva/DataBases | /Homework/05.AdvancedSQL/28.sql | UTF-8 | 405 | 4.40625 | 4 | [] | no_license | /*Problem 28. Write a SQL query to display the number of managers from each town.*/
SELECT mt.Town, COUNT(*) AS [Number of manager]
FROM (SELECT DISTINCT e.EmployeeID, e.FirstName, e.LastName, t.Name AS Town
FROM Employees e
JOIN Employees m
ON m.ManagerID = e.EmployeeID
JOIN Addresses a
ON a.AddressID = e.Addr... | true |
f6b676ebf73c9277df597ecfaa98bbdd525d91fd | SQL | magoo-lau/glaf | /db/postgresql/ui/create_table.sql | UTF-8 | 2,196 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive |
CREATE TABLE UI_LAYOUT(
ID_ varchar(50) NOT NULL,
ACTORID_ varchar(255),
COLUMNSTYLE_ varchar(255),
COLUMNS_ int4,
CREATEDATE_ timestamp,
DATAINDEX_ int4,
NAME_ varchar(50) NOT NULL,
PANELS_ varchar(255),
SPACESTYLE_ varchar(50),
TEMPLATEI... | true |
359ffbd9c48d4fd6c5ea5dc4a4137c5bbaaa714f | SQL | aaronquach123/employee-tracker | /db/seeds.sql | UTF-8 | 536 | 2.75 | 3 | [] | no_license | INSERT INTO department
(name)
VALUES
("Sales"),
("Development"),
("Advertising"),
("Executive");
INSERT INTO role
(title, salary, department_id)
VALUES
("CEO", 110001000, 1),
("Manager", 1232112, 1),
("Sales Assistant", 152324, 2),
("Marketing Manager", 123123, 2),
("IT", 324... | true |
d72fcc200ac6c0bd79c6dcc5973496f469fdbad3 | SQL | kimseungtae1/datehaeng | /project01/WebContent/sql/member.sql | UTF-8 | 559 | 3.25 | 3 | [] | no_license | --#회원관리테이블
create table member(
mUserid varchar2(10) primary key, --[회원아이디]
mPw varchar2(10), --회원비밀번호
mName varchar2(10), --회원이름
mBirth char(6), --회원생년월일
mPhone char(13), --회원휴대전화번호
mAddress varchar2(50), --회원집주소
mGender varchar2(6), --회원성별
mEmail varchar2(30) --회원이메일
... | true |
2f1208062d95eeeeeed299e3dde0c4928513dafd | SQL | jhrubiano10/smarttoolsV2 | /BD/01_09_2016/smarttools/estado_video.sql | UTF-8 | 1,499 | 3.03125 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Host: localhost
-- Server version: 5.1.33-community-log - MySQL Community Server (GPL)
-- Server OS: Win32
-- HeidiSQL version: 7.0.0.4053
-- Date/time: 2016-09-01 ... | true |
85fdbbb978594f94003c175f1aafa988fb9131a9 | SQL | tpgwidget/bot | /dump.sql | UTF-8 | 2,257 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Généré le : Mer 06 Juin 2018 à 09:18
-- Version du serveur : 5.6.33-log
-- Version de PHP : 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... | true |
63ed0689f29e2ccdd663fbd95e192a3c6b1727cc | SQL | ynsingh/repos | /deiedrp/trunk/CMS/Scripts/CMS-Triggers-Script.sql | UTF-8 | 32,956 | 3.140625 | 3 | [] | no_license | -- MySQL dump 10.11
--
-- Host: localhost Database: cms
-- ------------------------------------------------------
-- Server version 5.0.77
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@CO... | true |
ef386cd5c83ea3ba0b355828c5300c19ccf0b9db | SQL | sergiomt/hipergate | /classes/trunk/com/knowgate/hipergate/datamodel/upgrade/oracle/210-220.ddl | UTF-8 | 10,456 | 3.125 | 3 | [] | no_license | CREATE TABLE k_login_audit (
bo_success CHAR(1) NOT NULL,
nu_error NUMBER(6) NOT NULL,
dt_login DATE DEFAULT SYSDATE,
gu_user CHAR(32) NULL,
tx_email VARCHAR2(100) NULL,
tx_pwd VARCHAR2(50) NULL,
gu_workarea CHAR(32) NULL,
ip_addr VARCHAR2(15) NULL
)
GO;
ALTER TABLE... | true |
57de3b5353c81de73cd7a9a1f23e5f4202c8ba75 | SQL | rdrgzma/BD1 | /BD_ADS2_CURSO/consulta_salario_roud.sql | UTF-8 | 244 | 2.96875 | 3 | [] | no_license | use ads2_curso;
select funcionarios.nome as 'Nome',
round(salario,2) as 'Salario',
round(salario*1.15, 2) as 'Salario+15% ',
funcionarios.departamento as 'Departamento'
from funcionarios
where Departamento = 'TI' or Departamento = 'Marketing'; | true |
8efde4d50d3b6534b4b716b7558c2a14adc356fc | SQL | phmartins86/SQLServer | /usuarios com acesso a database.sql | UTF-8 | 359 | 3.140625 | 3 | [] | no_license | -->> Usuarios com acesso a database
With user_acesso ([uSER ID] , [sERVER LOGIN] , [DATABASE])
AS
(
SELECT [uSER ID] , [sERVER LOGIN] , [DATABASE] FROM ##ACESSO
GROUP BY
[uSER ID] , [sERVER LOGIN] , [DATABASE]
)
select @@servername as [INSTÂNCIA], [DATABASE], count(1) AS [QTD USUARIOS] from user_acesso GROU... | true |
aae239551b1b9a5aa58219c855f91fa3581ffa75 | SQL | insurance-verification/insurance-verification | /src/main/resources/db/schema.sql | UTF-8 | 701 | 3.4375 | 3 | [] | no_license | CREATE TABLE vehicle (
id INT NOT NULL,
policy_number VARCHAR(30) NOT NULL,
effective_date TIMESTAMP NOT NULL,
expire_date TIMESTAMP NOT NULL,
vin VARCHAR(25) NOT NULL,
removed BOOLEAN DEFAULT FALSE,
PRIMARY KEY(id)
);
/*
CREATE TABLE IVS_AuditRequest (
id INT auto_incremen... | true |
313aa39d808a79a04a9da99a49166ff8caec6416 | SQL | bekendz/NghiaTrangOnline | /nghiatrangonline1.sql | UTF-8 | 5,413 | 2.71875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 19, 2020 at 09:28 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
35148de9a61dc57fc5f28e95dfc5c2aa3c3ea089 | SQL | nicove68/myphones-api | /src/main/resources/data.sql | UTF-8 | 550 | 2.875 | 3 | [] | no_license | DROP TABLE IF EXISTS import_file_register;
CREATE TABLE import_file_register (
id INT AUTO_INCREMENT PRIMARY KEY,
imported_date VARCHAR(250) NOT NULL,
file_name VARCHAR(250) NOT NULL
);
DROP TABLE IF EXISTS mobile_number;
CREATE TABLE mobile_number (
id INT AUTO_INCREMENT PRIMARY KEY,
number V... | true |
09396298304002f1b806ca4d4d14fa850da1eb3e | SQL | iainbriscoe/fullstack-nanodegree-vm | /vagrant/tournament/tournament.sql | UTF-8 | 729 | 3.546875 | 4 | [] | no_license | -- Table definitions for the tournament project.
--
-- Put your SQL 'create table' statements in this file; also 'create view'
-- statements if you choose to use it.
--
-- You can write comments in this file by starting them with two dashes, like
-- these lines here.
--drop the table if its there, so that you can star... | true |
e179845e1076186cf7857ed8ba01ca295f46d5cf | SQL | hmathsan/Test-.Net | /Conta Corrente/Conta.sql | MacCentralEurope | 1,557 | 3.171875 | 3 | [] | no_license | --
-- File generated with SQLiteStudio v3.2.1 on dom out 20 21:11:44 2019
--
-- Text encoding used: System
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- Table: Clientes
CREATE TABLE Clientes (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, nome VARCHAR NOT NULL, cpf VARCHAR NOT NULL, conta INTEGER NOT NULL, agenc... | true |
b85d7e92add9e062febd9e9a64ea5df97ae7b55a | SQL | sgrzys/docker-oracle-apex5-ords | /assets/apex/core/wwv_flow_builder_search_dev.sql | UTF-8 | 1,635 | 2.765625 | 3 | [] | no_license | set define '^'
set verify off
prompt ...wwv_flow_builder_search_dev
create or replace package wwv_flow_builder_search_dev
as
--------------------------------------------------------------------------------
--
-- Copyright (c) Oracle Corporation 2009 - 2012. All Rights Reserved.
--
-- NAME
-- wwv_flow_builder... | true |
908f73ac19da73368f2f800993d8ff90dd4164e8 | SQL | idellang/SQLZOO-Answers | /Select From Nobel.sql | UTF-8 | 1,270 | 3.953125 | 4 | [] | no_license | --#1
SELECT yr, subject, winner
FROM nobel
WHERE yr = 1950
--#2
SELECT winner
FROM nobel
WHERE yr = 1962
AND subject = 'Literature'
--#3
SELECT yr, subject
FROM nobel
WHERE winner = 'Albert Einstein'
--#4
SELECT winner
FROM nobel
WHERE yr >1999 AND subject = 'Peace'
--#5
SELECT *
... | true |
3011a0a374c7600ff63683e167847184cc106372 | SQL | dheerajdeveloper/user-registration | /sql-scripts/ddl.sql | UTF-8 | 971 | 3.25 | 3 | [] | no_license | CREATE TABLE `Privilege` (`id` bigint(20) NOT NULL, `name` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) );
CREATE TABLE `Role` (`id` bigint(20) NOT NULL, `name` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) );
CREATE TABLE `user` (`id` bigint(20) NOT NULL AUTO_INCREMENT, `email` varchar(255) DEFAULT NULL, `enabled` ... | true |
e76757e144e12e8f63a281fec63292eaa49cc142 | SQL | shahraj1/InnerJoinsAndClusteredIndexSimpleExample | /UnclusteredIndex.sql | UTF-8 | 41,317 | 3.984375 | 4 | [] | no_license | -- --------------------------------------------------------------------------------
-- --------------------------------------------------------------------------------
-- --------------------------------------------------------------------------------
-- Options
-- -----------------------------------------------------... | true |
df549117bfb37914aae7a0c941a7eab59ba3253b | SQL | edwinksl/zotero-better-bibtex | /bin/journalAbbrev.sql | UTF-8 | 225 | 3.078125 | 3 | [
"Unlicense"
] | permissive | select distinct it.typeName, f.fieldName
from itemtypefields itf
join itemtypes it on itf.itemTypeID = it.itemTypeID
join fields f on itf.fieldID = f.fieldID
where f.fieldname in ('journalAbbreviation', 'reporter', 'code')
;
| true |
0dbdb2345aa437e54f1e374809a94a8aaf6ad79e | SQL | Khady199/Google_meet_course_analyzer | /module_evaluation/trigger.sql | UTF-8 | 483 | 2.734375 | 3 | [
"MIT"
] | permissive | -- Trigger Reponse
--
DELIMITER $$
CREATE TRIGGER `Evaluation` AFTER INSERT ON `Reponse` FOR EACH ROW BEGIN
SET @NoteEvaluation = ((new.r1+new.r2+new.r3+new.r4+new.r5+new.r6+new.r7+new.r8+new.r9+new.r10+new.quest11+new.r12+new.r13+new.r14+new.r15+new.r16+new.r17+new.r18)*20)/72;
SET @IdEtudiant = new.IdEtudiant;
SET @I... | true |
8c09a08285f632455241f3b168259133fbe6c4a0 | SQL | trabz777/Data-warehouse-Oracle | /1_Implementation of Star schema/Implementation_of_star_schema.sql | UTF-8 | 2,950 | 3.15625 | 3 | [] | no_license |
CREATE TABLE "AZ5645A"."REQUEST_DIM"
("REQUEST_ID" NUMBER NOT NULL ENABLE,
"PRACTICE_ID" VARCHAR2(20 BYTE),
"REQUEST_DATE" DATE,
CONSTRAINT "REQUEST_DIM_PK" PRIMARY KEY ("REQUEST_ID")
);
CREATE TABLE "AZ5645A"."TYPE_COVER_DIM"
("TYPE_COVER_ID" NUMBER NOT NULL ENABLE,
"DESCRIPTION" ... | true |
652527409b499d1f53bb3f2b319974d78a620793 | SQL | zz0733/op-gbsql | /history/v1073/companies/V1.0.1.0070__U_sys_dict.sql | UTF-8 | 15,815 | 2.515625 | 3 | [] | no_license | -- auto gen by admin 2016-04-10 20:50:06
DELETE FROM sys_dict WHERE "module"='common' AND dict_type='bankname';
INSERT INTO "sys_dict" ("module", "dict_type", "dict_code", "order_num", "remark", "parent_code", "active")
SELECT 'common', 'bankname', 'alipay', '1', '支付宝', NULL, 't'
WHERE 'alipay' not in (SELECT dict_cod... | true |
027c7753538eadfad82edb3544b5d97e9dda760c | SQL | Max-Pano/fomjar | /src/ski/ski-cdb/conf/voidcraft/setup/sp/sp_lock_account_return/sp_update_tbl_journal_game_account.sql | GB18030 | 776 | 3.5 | 4 | [] | no_license | /*tbl_journal_game_account*/
DELIMITER //
DROP PROCEDURE IF EXISTS `ski`.`sp_update_tbl_journal_game_account` //
CREATE PROCEDURE `ski`.`sp_update_tbl_journal_game_account`(
in i_gaid integer, -- Ϸ˺
in in_c_caid varchar(64), -- ˻ID
in t_change datetime, -- 仯ʱ
in i_state_be... | true |
04ae9dbac52fcc684f27c1bf26f4bc86156bca1d | SQL | phamthanhtu99/bongda132 | /.idea/dataSources/d6a1a616-f93d-48b6-bccf-c1309f530935/storage_v2/_staging_/schema/bongda.w62KrQ/table/team.XUI2AA/trigger/updateteamstatus.GKoYGg.sql | UTF-8 | 250 | 2.921875 | 3 | [] | no_license | create definer = root@localhost trigger updateteamstatus
after update
on team
for each row
begin
if(select * from team WHERE membermax= NEW.membermin)>1 then
update team set status =2 WHERE id =NEW.id;
end if;
end;
| true |
7294667788b632a38dcddd43a70cb0620601907f | SQL | ParknShopTmazon/ParknShopTmazon | /testdata_customer/test1.sql | UTF-8 | 8,086 | 2.96875 | 3 | [] | no_license |
use parknshop;
-- user
-- -- customer !!!!! NAME:123456 PASSWORD:123456
insert into user(userId,name,password,role,status) values(12312,'c123456','c123456','customer','normal');
-- -- shop_owner
INSERT INTO `parknshop`.`user` (`userId`, `name`, `password`, `role`, `status`) VALUES (7878, 'cartTestUser', 'cartTest'... | true |
620790bebb4d69fbf2db786745414ffaee411258 | SQL | HTTPArchive/almanac.httparchive.org | /sql/2022/seo/core-web-vitals.sql | UTF-8 | 1,804 | 3.796875 | 4 | [
"Apache-2.0"
] | permissive | #standardSQL
# Calculate the percent of origins that comply with each Core Web Vital's "good" threshold for 75% or more of experiences.
CREATE TEMP FUNCTION IS_GOOD (good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS (
good / (good + needs_improvement + poor) >= 0.75
);
CREATE TEMP FUNCTION IS_NON... | true |
f0497dcfeacb861e47209fa159f75c3167354282 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day19/select0906.sql | UTF-8 | 178 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-18T09:06:00Z' AND timestamp<'2017-11-19T09:06:00Z' AND temperature>=47 AND temperature<=58
| true |
df38b9f190986c27aa7e98c17991972abd3996e0 | SQL | yuanchiam/misc | /web_traffic.sql | UTF-8 | 567 | 3 | 3 | [] | no_license | set session hive.aws_iam_role='arn:aws:iam::219382154434:role/s3_all_with_vault';
select count(distinct nrm_id), utc_date
from vault.clevent_f
where navigation_level in ('nmLanding','signupSimplicity-planSelection','signupSimplicity-planSelectionWithContext','login')
and source in ('www', 'www-hosted')
and visitor_st... | true |
843858ea0d489edc64cbe6bd69e843dbc54f6f53 | SQL | sougo-i/sql | /surveys2.sql | UTF-8 | 1,227 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 2019 年 10 月 24 日 05:42
-- サーバのバージョン: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... | true |
2269b02bdcef1d37173ed73e5f1335c867fd442d | SQL | arydsr/MySQL | /MySQL/20.07.2021/ATIVIDADE 1 - RH DA EMPRESA.sql | UTF-8 | 1,326 | 3.125 | 3 | [] | no_license | create database db_rh;
use db_rh;
create table tb_funcionarios(
id bigint auto_increment,
nome varchar(255),
cargo varchar(255),
idade int,
salario decimal(8,2),
primary key(id)
);
insert into tb_funcionarios(nome, cargo, idade, salario) values("Ary de Sá", "Desenvolvedor Back-end Jr.", 29, 5000.00);
insert into tb_... | true |
e0b1a056bb1c7a57b48ac1f92042ce06edc3a478 | SQL | ismail-sk/CS50x-WEEK7 | /pset7/fiftyville/log.sql | UTF-8 | 2,161 | 3.734375 | 4 | [] | no_license | -- Keep a log of any SQL queries you execute as you solve the mystery.
-- reaching the crime case
SELECT description FROM crime_scene_reports
WHERE year = 2020 AND month = 7 AND day = 28 AND street = "Chamberlin Street";
--find mentioned "courthouse" in interviews
SELECT name, transcript FROM interviews WHERE transcri... | true |
024eebcde5cbbda9e1156af187537547a39acf0d | SQL | Malllm/MonetDBLite | /src/sql/scripts/51_sys_schema_extension.sql | UTF-8 | 4,436 | 3.15625 | 3 | [] | no_license | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
--
-- Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V.
-- create additional tables in "sys" schema
C... | true |
1fcbaa6817546afa4d770c169747715fe9c9a734 | SQL | jackyecordova/residencias | /presidencia.sql | UTF-8 | 10,053 | 2.9375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
<<<<<<< HEAD
-- Generation Time: Aug 23, 2017 at 08:51 PM
=======
-- Generation Time: Oct 30, 2017 at 08:44 PM
>>>>>>> 6a89b877e83efa9e06b1f38d5f69c3ad07ec3928
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_... | true |
e3aebc8f485bed6d9a14af3a3fea1a5ad96c8430 | SQL | madrigje/got | /db/got.sql | UTF-8 | 5,038 | 3.859375 | 4 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
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 N... | true |
2e692b02728b8b7a09c569a0f0a81c883cd88a99 | SQL | kalintsenkov/SoftUni-Software-Engineering | /CSharp-DB/Databases-Basics/Exams/DemoExam-13-Oct-2019/06HeavyHTML.sql | UTF-8 | 155 | 3.1875 | 3 | [
"MIT"
] | permissive | SELECT f.Id, f.[Name], f.Size
FROM Files AS f
WHERE f.Size > 1000
AND f.[Name] LIKE '%html%'
ORDER BY f.Size DESC,
f.Id,
f.[Name]
| true |
0e473fc3174acb45bf88cf09994cc3aa1b38de33 | SQL | javiperales/BasesDeDatos | /tema12.sql | ISO-8859-10 | 2,373 | 3.84375 | 4 | [] | no_license | create or replace procedure ejercicio1
as
cursor cur1 is select clientes.apellidos, pedidos.fecha_pedido from clientes, pedidos
where clientes.id_cliente=pedidos.id_cliente
order by clientes.apellidos asc;
v_reg_c_cur1 cur1%type;
begin
open cur1;
loop
fetch cur1 into v_reg_c_cu... | true |
fb22afb0f573c6610473658425cc59dc41612c32 | SQL | m-thomas89/Employee-Management-System | /seed.sql | UTF-8 | 480 | 2.96875 | 3 | [] | no_license | INSERT INTO department (name)
VALUES ("Human Resources"), ("R&D"), ("Engineering"), ("Accounting"), ("Sales");
INSERT INTO role (title, salary, department_id)
VALUE ("manager", 75000.00, 2), ("engineer", 52000, 3), ("accountant", 62500, 4), ("recruiter", 57500, 1), ("sales person", 85650, 5);
INSERT INTO employee (fi... | true |
f0bde1df4496a32972956bc287e0a164fd81a5a6 | SQL | fisromildojr/restaurante | /pw2_2020.sql | UTF-8 | 5,614 | 2.890625 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.17 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: pw2_2020
-- ------------------------------------------------------
-- Server version 10.3.22-MariaDB-1ubuntu1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_... | true |
ce2bcaa9067c38351e15728145cd67a8427234e8 | SQL | yanmingsohu/wechat-article | /sql/init.sql | UTF-8 | 3,562 | 3.15625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `wxmsg` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `wxmsg`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: wxmsg
-- ------------------------------------------------------
-- Server version 5.7.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA... | true |
9237ed905ad5d7bc5df866f7dd3484bdaf0f47ec | SQL | connercollins/S16D7 | /Part 1/sqlUsed.sql | UTF-8 | 8,552 | 3.765625 | 4 | [] | no_license | I-- PL/SQL
-- CONDITIONAL STATEMENTS:
NVL(:P1_USERTYPE,'') = 'President' OR
NVL(:P1_USERTYPE,'') = 'Interim_manager' OR
NVL(:P1_USERTYPE,'') = 'Manager'
--
NVL(:P1_USERTYPE,'') = 'President' OR
NVL(:P1_USERTYPE,'') = 'Manager'
--
NVL(:P1_USERTYPE,'') = 'President'
-- SHARED COMPONENTS
-- Parents
select first_name ... | true |
0a19accab2f1642b3c6264cdeee64cca39681d54 | SQL | jkitsakis/repository | /projects/ectn/postgresql96/postgresql-config/ectn/001_tables.sql | UTF-8 | 39,797 | 3.515625 | 4 | [] | no_license | -- Table: application_parameters
CREATE TABLE APPLICATION_PARAMETERS
(
CODE VARCHAR(50) NOT NULL,
COMMENTS VARCHAR(255),
VALUE VARCHAR(255),
CONSTRAINT PK_APPLICATION_PARAMETERS PRIMARY KEY (CODE)
);
-- Table: add_supplychain_actors
CREATE TABLE add_supplychain_actors
(
actor_sid bigint NOT NULL,... | true |
3bc5f8b79d5605548162d9f1e60dff9d94b7ea23 | SQL | seesharper/heatkeeper | /src/HeatKeeper.Server.Database/CreateForeignKeyFromProgramsToSchedules.sql | UTF-8 | 984 | 3.34375 | 3 | [] | no_license | PRAGMA foreign_keys = 0;
CREATE TABLE sqlitestudio_temp_table AS SELECT *
FROM Programs;
DROP TABLE Programs;
CREATE TABLE Programs (
Id INTEGER PRIMARY KEY AUTOINCREMENT
NOT NULL,
LocationId INTEGER CONSTRAINT FK_PROG... | true |
80a7dad7e8b9c489723b92b804ac1882e0d032e9 | SQL | Smith-Chris1/acme | /sql/acme.sql | UTF-8 | 14,821 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 13, 2018 at 05:13 AM
-- Server version: 10.1.22-MariaDB
-- PHP Version: 7.1.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
4ff673b64dcbd8eb5c05fec90e76ce108af2c644 | SQL | prestodb/presto | /presto-product-tests/src/main/resources/sql-tests/testcases/csv_table_with_custom_parameters.sql | UTF-8 | 1,194 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | -- database: presto; tables: csv_table_with_custom_parameters; groups: hive, storage_formats;
--! name: scan from csv table
SELECT * FROM csv_table_with_custom_parameters
--!
10|QQ
--! name: describe csv table
DESCRIBE csv_table_with_custom_parameters
--!
c_bigint|varchar|||
c_varchar|varchar|||
--! name: show create c... | true |
dd2a70f81dfb0950f79408c28d99bb5b480a2b28 | SQL | polyactis/repos | /variation/trunk/src/dbSNP_pg.sql | UTF-8 | 2,916 | 3.046875 | 3 | [] | no_license | create schema dbsnp;
set search_path to dbsnp;
create table strain_info(
id integer,
acc varchar primary key,
tax_id integer,
name varchar,
category varchar,
description varchar,
date_created timestamp default current_timestamp,
pop_location varchar, --below until -- is from Diane.xls
pop varchar,
line inte... | true |
116d130de1ad029465d5699a2f78246899c9a815 | SQL | ekspertas/MySQL | /Lesson7/Task-7_2_V2.sql | UTF-8 | 923 | 4.03125 | 4 | [] | no_license | /* Практическое задание 7.*/
/* Задание # 2.
Выведите список товаров products и разделов catalogs,
который соответствует товару. У продукта может не быть каталога,
однако выводить такой продукт все равно необходимо.
*/
SELECT p2.name AS 'Название товара',
c2.name AS 'Раздел'
FROM products p2
LEFT J... | true |
e9562ef946ed72ea7b9029f8e89ac09d02f5264c | SQL | Kryozen/Forensics-Analysis | /database/clean_db_add_investigators.sql | UTF-8 | 1,368 | 2.625 | 3 | [] | no_license | USE df_framework;
DELETE FROM accelerometer;
DELETE FROM barometer;
DELETE FROM battery;
DELETE FROM brake_sensor;
DELETE FROM device;
DELETE FROM digital_investigator;
DELETE FROM gps;
DELETE FROM gyroscope;
DELETE FROM hrm;
DELETE FROM log;
DELETE FROM log_investigator;
DELETE FROM measurement;
DELETE FROM photo;
DE... | true |
84db73fd4d44714aebcfd68f650bca7689bf5d31 | SQL | evanallen13/Advanced-Database-Reference | /SQl/01/1_2Querry.sql | UTF-8 | 1,249 | 3.515625 | 4 | [] | no_license |
/* start C:\Users\evana\Desktop\IS480\one\1_2Querry.sql */
/* 1 */
select table_name
from user_tables;
/* 2 */
describe Students;
describe Enrollments;
describe SchClasses;
/* 3 */
select *
from Students;
select *
from Enrollments;
select *
from SchClasses;
/* 4 */
insert into Students(SNum,SName)
value... | true |
fb57c70fe077bd75715eade9779b5ff4d1b2a94f | SQL | umediga/oraebs | /tab/xx_xtrx_cus_alerts_master_t.sql | UTF-8 | 1,573 | 2.640625 | 3 | [] | no_license | DROP TABLE APPS.XX_XTRX_CUS_ALERTS_MASTER_T CASCADE CONSTRAINTS;
CREATE TABLE APPS.XX_XTRX_CUS_ALERTS_MASTER_T
(
APPLICATION_NAME VARCHAR2(240 BYTE) NOT NULL,
ALERT_ID NUMBER NOT NULL,
ALERT_NAME VARCHAR2(50 BYTE) NOT NULL,
DESCRIPTION VARCHA... | true |
6cd005e3ec9805adc9b61668dea406c147a85bd0 | SQL | carsonshan/InformationSystem | /reversers/database-synchroniser/plugins/org.obeonetwork.dsl.database.sqlgen.tests/datas/bootstrap/scenario-2/init-schema-G2D.sql | WINDOWS-1252 | 257,966 | 3.4375 | 3 | [] | no_license | /*
sqlplus sys/oracle as SYSDBA
CREATE USER "G2D" PROFILE "DEFAULT" IDENTIFIED BY "g2d" ACCOUNT UNLOCK;
GRANT "CONNECT" TO "G2D";
GRANT ALL PRIVILEGES TO "G2D";
connect g2d/g2d;
select table_name from user_tables;
select synonym_name from user_synonyms;
CREATE USER "AD" PROFILE "DEFAULT" IDENTIFIED BY "ad" ... | true |
3ff1c8b5609acb5062748ce0f865a46fb976353c | SQL | shyamkumarlchauhan/commcare-icds | /custom/icds_reports/migrations/sql_templates/database_views/daily_thr_ccs_record.sql | UTF-8 | 1,430 | 3.828125 | 4 | [] | no_license | DROP VIEW IF EXISTS daily_thr_ccs_record_view CASCADE;
CREATE VIEW daily_thr_ccs_record_view AS
SELECT
"daily_ccs_record_thr"."doc_id" AS "doc_id",
"ccs_record_monthly"."awc_id" AS "awc_id",
"awc_location_months"."district_id" AS "district_id",
"awc_location_months"."block_id" AS "bl... | true |
040f8e6dd7c4a7786c1b23fee81776bd44077823 | SQL | chile0101/ClickHouse | /event-processing-db/play_features/user_profile/get_sample_profile_by_tenant.sql | UTF-8 | 2,678 | 4.03125 | 4 | [] | no_license | SELECT
anonymous_id,
tenant_id,
argMaxMerge(identity.keys) AS identity_keys,
argMaxMerge(identity.vals) AS identity_vals,
argMaxMerge(str_properties.keys) AS str_pros_keys,
argMaxMerge(str_properties.vals) AS str_pros_vals,
argMaxMerge(num_properties.keys) AS num_pros_keys,
argMaxMerge(n... | true |
b155fe439db2002eb485a1ee7910e1ddf835a6a8 | SQL | anishsundaram/tpc-h-queries | /originals/q2.sql | UTF-8 | 1,436 | 3.96875 | 4 | [] | no_license | -- TPC-H/TPC-R Minimum Cost Supplier (Q2)
-- Postgres Query Definition
/* Returns information on the supplier that can provide a specified part given
a region for the lowest cost. In the case that there are multiple suppliers
offering the same price the query lists the top 100 in order of descending
account balanc... | true |
85b2f845d5c9b475fa93f85b3a7331113b5d05f6 | SQL | diegogalarza/Online-Merchandise-Shop | /BASES_2_OBTENER_XML_BACKORDER.sql | UTF-8 | 1,010 | 2.9375 | 3 | [] | no_license | create or replace PROCEDURE OBTENER_XML_BACKORDER(idPedidoI IN INTEGER) IS
xmldoc CLOB;
BEGIN
IF EXISTEPEDIDOBACKORDER(idPedidoI) = TRUE THEN
SELECT
XMLELEMENT("BACKORDER",
XMLELEMENT("idPedido",idPedidoI),
XMLCONCAT(
XMLSEQUEN... | true |
f9d0f57574a0980106c5e4b063b96f86a4a3d78d | SQL | jsebastianrincon/ModuloCRM_ProyectoFinal | /crmpry(2).sql | UTF-8 | 10,435 | 3.265625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 03-06-2021 a las 02:03:47
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
4f24457483fc521e83cbf5e1f9cd0652db75f137 | SQL | KsushaPerepechina/OnlineTraining | /db/online_training_db.sql | UTF-8 | 5,920 | 3.90625 | 4 | [] | no_license | create table users
(
id int auto_increment,
first_name varchar(35) not null,
last_name varchar(30) not null,
birth_date date ... | true |
0ebe499d7bdb654d350db108b0c70f8d905fac57 | SQL | emmanueletti/bootcampx | /2_queries_joins/1_students-total-assignment-duration.sql | UTF-8 | 339 | 4.0625 | 4 | [] | no_license | -- Get the total amount of time that a student has spent on all assignments.
-- This should work for any student but use 'Ibrahim Schimmel' for now.
-- Select only the total amount of time as a single column.
SELECT SUM(a_s.duration) AS total_duration
FROM assignment_submissions a_s
JOIN students s
ON a_s.student_id =... | true |
ca8bc7123c4911506dc77abf3bbcc4ad15957050 | SQL | Stoney0909/DB-Project-1 | /Normalization/create_status.sql | UTF-8 | 688 | 3.96875 | 4 | [] | no_license | USE Normalization1;
DROP TABLE IF EXISTS status;
CREATE TABLE status (
status_ID int(11) NOT NULL auto_increment,
status VARCHAR(25) NOT NULL,
PRIMARY KEY (status_ID)
) AS
SELECT DISTINCT status
FROM my_contacts
WHERE status IS NOT NULL
ORDER BY status;
ALTER TABLE my_contacts
ADD COLUMN status_ID INT(11);... | true |
8d45c0b5166f19a6222d42159f9a5a6a98e82fbb | SQL | schrapps/risksur | /src/main/resources/MySQL/201508111224_RSKSR-66_DDL.sql | UTF-8 | 715 | 3.0625 | 3 | [] | no_license | ALTER TABLE `surveillanceSections`
ADD COLUMN `sectionNumber` FLOAT(2,1) NOT NULL AFTER `sectionId`;
ALTER TABLE `options` DROP FOREIGN KEY `fk_componentId`;
ALTER TABLE `options` ADD CONSTRAINT `fk_componentId` FOREIGN KEY (`componentId`)
REFERENCES `surFormDetails`(`subFormId`)
ON UPDATE CASCADE ON DELETE CASCADE... | true |
c8db225d7e234d084ffb90a814cf59c39f2d0d07 | SQL | JoseGilbertoLopez/Bases-Tarea-Proyecto | /Proyecto Final/Sql/Sucursal.sql | UTF-8 | 1,002 | 3.53125 | 4 | [] | no_license | CREATE TABLE SUCURSAL(
ID_Sucursal Number GENERATED ALWAYS AS IDENTITY (START with 1 INCREMENT by 1),
Direccion VARCHAR(255),
Ciudad VARCHAR(255),
Estado VARCHAR(255)
);
ALTER TABLE SUCURSAL
ADD constraint PK_SUCURSAL
Primary Key(ID_Sucursal);
CREATE TABLE TELEFONOS_SUCURSALES(
ID_Telefono Number GENERATED ALWAYS AS ... | true |
ef80661934e915f1c0b300c571bc1b1a18bc2377 | SQL | scriptzteam/newzNZB-UseNet-Indexer | /db/patch/0.1.4-0.1.5/2010_09_29_partrepair.sql | UTF-8 | 355 | 2.75 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `partrepair` (
`ID` int(16) unsigned NOT NULL auto_increment,
`numberID` int(11) unsigned NOT NULL,
`groupID` int(11) unsigned NOT NULL,
`attempts` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`ID`),
UNIQUE KEY `ix_numberID_groupID` (`numberID`,`groupID`)
) ENGINE=MyISAM DEFAUL... | true |
b5147bf500b3d562e37764d38d18345ce1cb45cf | SQL | AndrewZXue/CS-143 | /CS-143/hw2/part3.sql | UTF-8 | 2,088 | 3.9375 | 4 | [] | no_license | -- a)
SELECT
trip_starts.trip_id, trip_starts.user_id, ifnull(TIMESTAMPDIFF(second, trip_starts.time, trip_ends.time), 86400) as elapsed
FROM trip_starts LEFT JOIN trip_ends
ON trip_starts.trip_id = trip_ends.trip_id and trip_starts.user_id = trip_ends.user_id
LIMIT 5;
+---------+---------+---------+
| trip_id | user... | true |
639426fa7bd023f0a92424f1b3c42034350db1d8 | SQL | GuiMello83/SenacCodAppWeb | /atividade3/Modelo_professor.sql | UTF-8 | 625 | 3.265625 | 3 | [] | no_license | CREATE DATABASE Modelo_prof;
CREATE TABLE usuario(
idUsuario INT NOT NULL AUTO_INCREMENT,
nome VARCHAR (50) NOT NULL,
idade SMALLINT,
email VARCHAR (30) NOT NULL,
senha VARCHAR (50) NOT NULL,
);
-- not null é pra não deixar em branco
SELECT * FROM usuario;
SELECT nome FROM usuario;
SELECT * FROM ... | true |
accc2c8762771a37709319fca434b55825769f20 | SQL | DanielSalanovaDmitriyev-iesemili/houseLaravel | /resources/house.sql | UTF-8 | 4,305 | 3.359375 | 3 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS `house`;
CREATE DATABASE IF NOT EXISTS `house`;
CREATE TABLE `houses` (
`hou_id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`hou_title` varchar(65) COLLATE utf8_spanish_ci NOT NULL,
`hou_description` varchar(250) COLLATE utf8_spanish_ci NOT NULL,
`hou_viv` varchar(30) CHECK (`... | true |
e6797e3ef8136182b16be4844f429ed92d01c4bf | SQL | SMC1/JK1 | /Integration/mutation_RSq.sql | UTF-8 | 1,165 | 2.671875 | 3 | [] | no_license | drop table IF EXISTS mutation_rsq;
CREATE TABLE mutation_rsq (
samp_id varchar(63) NOT NULL,
chrom varchar(31) NOT NULL, -- hg19
chrSta int unsigned NOT NULL,
chrEnd int unsigned NOT NULL,
ref varchar(63) NOT NULL,
alt varchar(63) NOT NULL,
r_nReads_ref mediumint unsigned NOT NULL,
r_nReads_alt mediumint unsign... | true |
248ac9891508939e339311569fc07abd537a764a | SQL | SO-EETAC/VFinal | /BBDD_Juego.sql | UTF-8 | 1,153 | 3.609375 | 4 | [] | no_license | DROP DATABASE IF EXISTS M1_BBDD_Juego;
CREATE DATABASE M1_BBDD_Juego;
USE JUEGO;
CREATE TABLE JUGADOR (
ID INT NOT NULL AUTO_INCREMENT,
NOMBRE VARCHAR(60),
USERNAME VARCHAR(60) NOT NULL,
PASSWORD VARCHAR(60) NOT NULL,
PRIMARY KEY (ID)
)ENGINE=InnoDB;
CREATE TABLE PARTIDA (
ID INT NOT NULL AUTO_INCREMEN... | true |
5611068f59984e8a96a40d2319ab805fde46cbb1 | SQL | joeljogy/OpenCV-Home-Security-System | /home_security_system.sql | UTF-8 | 1,267 | 2.609375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 23, 2017 at 11:19 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
4c81e56cd0b77e3d1466e40361d7824ed7f1420d | SQL | metellium/recursosh | /pekxel code.sql | UTF-8 | 571 | 2.953125 | 3 | [
"MIT"
] | permissive | create database pekxel;
use pekxel;
select * from tbl_empleado;
select * from tbl_datos_economicos;
select * from tbl_lenguajes;
select * from tbl_conocimientos;
create view resumen as select nombre, edad, direccion, estado, fecha_nacimiento, telefono, puesto, salario,lenguaje,porcentaje, curso
from tbl_empleado
inne... | true |
5980b58e2910eacf8f6c3570c19adb9446ff9752 | SQL | Gustavo123456789/ejemplo_trigers | /trigers/hr-27-04-2015.sql | UTF-8 | 1,349 | 3.4375 | 3 | [] | no_license | -- A15 ejercicio 9
SELECT FIRST_NAME ||', '|| JOB_ID AS "EMPLOYEE AND TITLE"
FROM EMPLOYEES;
SELECT FIRST_NAME ||', '|| JOB_ID "EMPLOYEE AND TITLE"
FROM EMPLOYEES;
--EJERCICIO 10
SELECT EMPLOYEE_ID
|| ',' || FIRST_NAME
|| ',' || LAST_NAME
|| ',' || EMAIL
|| ',' || PHONE_NUMBER
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.