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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
58a6e2431461ccdee8b68b21f8546d25bbbcb84f | SQL | TriggSumms/SQL-EZ-Exercise | /SQLQuery1.sql | UTF-8 | 2,483 | 4.03125 | 4 | [] | no_license | /* EXERCISE 17: *Tried multiple variations but I couldnt use Alias...
SELECT Song.Title, SongLength, Album.Title
FROM Song
LEFT JOIN Album ON Song.AlbumId = Song.Id
WHERE SongLength = (SELECT MAX(SongLength) FROM Song);
*/
/* EXERCISE 16:
SELECT Title, SongLength
FROM Song
WHERE SongLength = (SELECT MAX(SongL... | true |
838af46c4a5b22f7c75db6a57751c0db3decfc13 | SQL | sahirug/lms | /db/lms.sql | UTF-8 | 21,613 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 23, 2017 at 11:43 PM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
d809652c91d34a856a6c7c3e7b622dbf5c6c2766 | SQL | pratikp1681/Database-Management-System-for-SilverOak-Co-operative-High-School | /Project0501-01_{InsertInto}.sql | UTF-8 | 10,959 | 3.109375 | 3 | [] | no_license | INSERT INTO [SilverOak.Department] VALUES
('001', 'Social Sciences'),
('002', 'Mathematics'),
('003', 'Science'),
('004', 'Housekeeping'),
('005','Moral Science'),
('006', 'Language'),
('007', 'Home Science'),
('008', 'Physical Education'),
('009', 'Accounts'),
('010', 'Library');
SELECT * FROM [SilverO... | true |
2821172c0f6e1630ae1aab388fac9a7ac0f6b4c9 | SQL | P7sw/database | /create-table/005_createIndex.sql | UTF-8 | 551 | 3.59375 | 4 | [] | no_license | create table index_token (
tokenId int not null IDENTITY primary key,
token varchar(255) unique
);
create table index_postToken(
postTokenId int not null IDENTITY primary key,
postId int references posts,
tokenId int references index_token,
index index_postToken_FK_posts (postId),
index index_postToken_FK_index... | true |
a84391f6723183a2a0caa563460ff0114cf2ea5b | SQL | chaymaISETCH/mini-projet | /sql/mg.sql | UTF-8 | 1,288 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.4
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Jeu 19 Octobre 2017 à 21:56
-- Version du serveur : 5.7.9-log
-- Version de PHP : 5.5.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
51e9485dae62b8d306f3a57a99ade18c852ee7c2 | SQL | jskinner65/Project-Bookstore | /WebContent/import.sql | UTF-8 | 3,612 | 4.09375 | 4 | [] | no_license | /*
* Modifying BOOKS table.
*/
ALTER TABLE Book
DROP column category;
ALTER TABLE Book
ADD category ENUM('EECS1','EECS2','EECS3', 'EECS4'),
ADD coursecode varchar(10);
CREATE TABLE User (
uid INT UNSIGNED NOT NULL AUTO_INCREMENT,
email VARCHAR(30) NOT NULL UNIQUE,
password VARCHAR(80) NOT NULL,
pr... | true |
9022afe995b623da4d1748d3d1573e8452987c79 | SQL | MikeRena77/sdlw | /SQL/TIMS/PB/qBaseHours.SQL | UTF-8 | 634 | 3.5625 | 4 | [] | no_license | select PROJECT=ae_j_prj_d.project,
DESCRIPTION=ae_j_prj_e.prj_dsc,
WORKREQUEST=ae_p_wka_d.proposal,
EMPLOYEE=ae_p_wka_d.shop_person,
LABOR=ae_p_wka_d.labor_type,
TOTAL=SUM(ae_p_wka_d.act_hrs)
from ae_p_wka_d,
ae_j_prj_d,
ae_j_prj_e
where ( ae_j_prj_d.project = ae_j_prj_e.project ) and
( ae_j_prj_d.prop... | true |
6d9e05f98e5a4bd3422c00af86f893944d2eccf9 | SQL | jetma/adso | /source/text.cpp | UTF-8 | 69,810 | 2.71875 | 3 | [] | no_license | #include "text.h"
#include <iostream>
#include <fstream>
#include <string.h>
#include <sstream>
#include <vector>
#include "unit.h"
#include "adso.h"
#include "code.h"
#include "encoding.h"
#include "feedback.h"
#include "memory.h"
#include "ontology.h"
#include "parser.h"
#include "polisher.h"
using namespace std;
... | true |
cb312de0324cedbcfe09dbff4aa19e148f86b0f6 | SQL | Seromontis/MVC_Maydana | /SQL/PostgresSQL/site_contato.sql | UTF-8 | 1,587 | 3.25 | 3 | [] | no_license | -- Table: public.site_contato
-- DROP TABLE public.site_contato;
CREATE TABLE public.site_contato
(
id serial,
id_conta integer,
usu_codigo_change integer,
titulo character varying(200) NOT NULL DEFAULT 'contato'::character varying,
subtitulo character(200) NOT NULL DEFAULT 'entre_em_contato'::bpchar,
men... | true |
917495549c5c59b1ecc1f030def0e70bca711bd2 | SQL | aosyborg/steelfig_db | /schema/functions/mark_purchased.sql | UTF-8 | 617 | 3.765625 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS mark_purchased;
DELIMITER $$
CREATE PROCEDURE mark_purchased(
IN i_wishlist_id INT UNSIGNED,
IN i_account_id INT UNSIGNED
)
BEGIN
DECLARE v_is_valid BOOLEAN;
SELECT true INTO v_is_valid
FROM wishlists w
JOIN attendees a1 ON w.attendee_id = a1.id
JOIN attendees a2 O... | true |
9af76c0beb692f537422ab6bed6d2b98ae4c7988 | SQL | dwikis/incloud | /music.sql | UTF-8 | 7,040 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 25, 2020 at 08:51 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
ce7dfd1578baaa805c8f5d7dff0a755c9a865a07 | SQL | NPochta/chessfed | /4_FL.sql | UTF-8 | 1,176 | 3.5 | 4 | [] | no_license |
set dateformat dmy
-- Выбрать турнир с наибольшим количеством гроссмейстеров.
/*
--Выбрать тех шахматистов, которые выиграли не менее трех турниров в течение 2005 г.
select pl.pl_name as 'Chessmates, who won 3 tournaments during 2005' from
(
select plyr.FIRST_NAME + ' ' + plyr.LAST_NAME a... | true |
c4d58489757da9931225fbde25cf0520bcc96a34 | SQL | eltonsantos07/MySQL-Generation | /Semana 1/Atividade2.sql | UTF-8 | 2,021 | 3.375 | 3 | [] | no_license | create database db_E_commerce;
use db_E_commerce;
-- Criando a tabela de dados
create table tb_produtos(
id int auto_increment,
setor varchar (255),
nomeProduto varchar (255),
marca varchar (255),
valor decimal (7,2),
quantidade int(3),
primary key (id)
);
-- Inserindo dados na tabela
insert into tb_produtos (setor... | true |
67bb3a64064e8a8d26ccc7a39f27ce5e151eb252 | SQL | lingcSun/oracle-db | /performance/active_session.sql | UTF-8 | 224 | 2.515625 | 3 | [] | no_license | SET LINESIZE 250
SET PAGESIZE 200
COL PROGRAM FOR A40
COL MODULE FOR A50
COL EVENT FOR A50
COL STATE FOR A20
SELECT PROGRAM, MODULE, EVENT, STATE FROM V$SESSION
WHERE
STATUS = 'ACTIVE'
AND TYPE <> 'BACKGROUND'
ORDER BY 1
/
| true |
12a26d4f17c5edf82888f43b69d3a3c5ab4c3b56 | SQL | wladko0/sql-scripts-macola-wisys-epicor | /SP-BuildShipment.sql | UTF-8 | 3,305 | 3.578125 | 4 | [] | no_license | ALTER PROC BG_BuildShipment
(
@txtShipment VARCHAR(30),
@NextBOLNo VARCHAR(8)
)
AS
BEGIN
-- UPDATED: 7/11/12 BY: BG
-- Purpose: Write back data to wsShipment and update control tables -- For Wisys build shipment App
BEGIN TRANSACTION
--Select @txtShipment = (Select Right(Replica... | true |
58ad219b1dcb09abb2f8b49b072942a2bb503f15 | SQL | abdellani/solved-challenges | /hackerrank/sql/Weather Observation Station 12.sql | UTF-8 | 255 | 3.078125 | 3 | [] | no_license | /*
source: https://www.hackerrank.com/challenges/weather-observation-station-12/problem
*/
select distinct(city) from station where
lower(substr(city,1,1)) not in ('a','e','u','i','o')
and lower(substr(city,length(city),1)) not in ('a','e','u','i','o')
| true |
3e00bc4f2e0104dc7cc19844aa3fffed128e3a1e | SQL | ProgHubng/stdrecmgtsys | /web_student_reg.sql | UTF-8 | 22,569 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 24, 2020 at 12:29 PM
-- Server version: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
50fe248b52fa8a493fd08b055fe64e081ede51d0 | SQL | radtek/Database-3 | /oracle/admin/scripts/open_cursor_pl.sql | UTF-8 | 2,126 | 2.734375 | 3 | [] | no_license | declare
p_ejercicio NUMBER := 2019;
p_numcred NUMBER := 38957;
p_act_int VARCHAR2(32) := 'DUW';
p_f_e_desde DATE := to_date('01-ENE-19','DD-MON-YY');
p_f_e_hasta DATE := to_date('31-DIC-19','DD-MON-YY');
p_f_i_desde DATE := to_date('01-ENE-19','DD-MON-YY');
p_f_i_hasta DATE := to_date('31-DIC-19','DD-MON-YY');
... | true |
ac6a8ea5ae5d4eaf511eed95f656c0a7d703937e | SQL | dingGator/C2540-Database-Management | /C5_SODB_2.sql | UTF-8 | 555 | 3.84375 | 4 | [] | no_license | use salesordersexample;
select CustomerID,
orderdate,
OrderNumber
from orders
order by customerId asc, orderdate desc, ordernumber asc
;
/*
CREATE
ALGORITHM = UNDEFINED
DEFINER = `root`@`localhost`
SQL SECURITY DEFINER
VIEW `ch05_orders_by_customer_and_date` AS
SELECT
`orders`.`Cust... | true |
bf7e06b70baa8f99ff9512d28806cf460fbee4b4 | SQL | zhangwang0537/LeetCode-Notebook | /source/All_Solutions/0571.给定数字的频率查询中位数/0571-给定数字的频率查询中位数.sql | UTF-8 | 554 | 4.40625 | 4 | [
"MIT"
] | permissive | select avg(t.minnum) median from
(select min(a1.number) minnum
from
(select n1.number,sum(n2.frequency) cumsum from numbers n1,numbers n2
where n1.number>=n2.number group by n1.number) a1,
(select sum(frequency) cnt from numbers)a2
where a1.cumsum>=floor((a2.cnt+1)/2)
union all
select min(a3.n... | true |
ea29cdfd829463bab188d611e352e491da917fd7 | SQL | 1907-jul01-java/project-1-kbui314 | /db/schema.sql | UTF-8 | 2,739 | 3.140625 | 3 | [] | no_license | drop table if exists employee;
drop table if exists request;
create table employee(
username text primary key,
password text,
category text not null,
firstname text not null,
lastname text not null,
phone_number text,
email text,
salt bytea,
hash bytea
);
create table request(
request_id serial primary key,... | true |
b4e507dedfc7411cccbda37af702357fe6eb88eb | SQL | mengzhiang/mza | /S2SH/src/sql.sql | UTF-8 | 11,910 | 3.109375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.1.49, for Win32 (ia32)
--
-- Host: localhost Database: bbs
-- ------------------------------------------------------
-- Server version 5.1.49-community
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU... | true |
bc08e44f0315401dcc3778a9fdf5a7f5cf9f4ff6 | SQL | allenchng/Bit-O-Code | /leetcode/SQL/Leetcode 1412 Find The Quiet Students In All Exams.sql | UTF-8 | 729 | 4.40625 | 4 | [] | no_license | # use window function to find students that have max and min scores on each test
# use in subq for Student table where id NOT in max or min
# because returning all rows, need to filter for where score field is same as max or min field
# use another where subq to find students that don't take any test (5)
SELECT stude... | true |
f4227782ab4ecdda46b3652f1391afcf82aa50e1 | SQL | loyolajavi/ArtecDiploma | /Anotaciones/SQLQuery1.sql | UTF-8 | 1,289 | 3.859375 | 4 | [] | no_license | SELECT Cat.DescripCategoria, SolDet.Cantidad
FROM SolicDetalle SolDet
INNER JOIN Categoria Cat
ON SolDet.IdCategoria = Cat.IdCategoria
INNER JOIN PartidaDetalle PDet
ON SolDet.IdSolicitud = PDet.IdSolicitud AND SolDet.IdSolicitudDetalle = PDet.IdSolicitudDetalle
INNER JOIN Partida Par
ON Par.IdPartida = PDet.IdPartida
... | true |
4fb457e22f78a7b3018eabec69d8904ed0772ed7 | SQL | sreeves3606/StephanieReevesIT2351 | /Actual Lab 1/ActualLab1_2.sql | UTF-8 | 388 | 3.984375 | 4 | [] | no_license | SELECT orders.OrderID, customers.CustomerID, customers.CompanyName AS 'Company Name', customers.Country, employees.EmployeeID, CONCAT(TitleOfCourtesy, ' ', FirstName, ' ', LastName)
AS 'Employee Name'
FROM employees
JOIN orders ON employees.EmployeeID = orders.EmployeeID
JOIN customers ON customers.CustomerID = orde... | true |
8552fdacb0ea1b00bc6960ba5096004f2db81bd7 | SQL | fabricantejerome/cfg | /cfg/administrator/components/com_cfgvideos/resources/install/install.sql | UTF-8 | 1,377 | 3.484375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `#__cfgvideos_videos` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
`uuid` char(36) NOT NULL UNIQUE,
`title` varchar(255) NOT NULL,
`video_url` varchar(255) NOT NULL,
`img_url` varchar(255) NOT NULL,
`description` longtext,
`enabled` tinyint(1) NOT NULL default 1,
`cr... | true |
d7a6a235fa11a5d1966ee34447d14de626f91bfa | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day20/select1513.sql | UTF-8 | 191 | 2.75 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-19T15:13:00Z' AND timestamp<'2017-11-20T15:13:00Z' AND SENSOR_ID='d4c9dc7a_0efd_47f2_8cae_f0c4b33e9d38'
| true |
1af99da694b8f18e7eecb0bb6ad08ff9965117bc | SQL | sdeli/learning-curve | /mysql-tut/mysql-tut-files/information_schema.sql | UTF-8 | 235 | 2.609375 | 3 | [] | no_license | use information_schema;
show tables;
SELECT * FROM GLOBAL_VARIABLES;
SELECT * from TABLES
where TABLES.TABLE_SCHEMA = 'mydatabase';
SELECT * FROM VIEWS
where TABLES.TABLE_SCHEMA = 'mydatabase';
use performance_schema;
SHOW tables; | true |
ec084980dab48e7b67d83fef321614f53af9ca83 | SQL | kimseunggwon/jsp20210510 | /WebContent/WEB-INF/sql/SELECT02WHERE.sql | UTF-8 | 1,349 | 4.0625 | 4 | [] | no_license | -- WHERE : row를 조건으로 필터
SELECT *
FROM Customers
WHERE Country="Mexico";
SELECT *
FROM Customers
WHERE CustomerID = 1;
SELECT * FROM Products
WHERE Price = 18;
SELECT * FROM Products
WHERE Price > 30;
SELECT * FROM Products
WHERE Price < 30;
SELECT * FROM Products
WHERE Price >= 30;
SELECT * FROM Products
WHERE... | true |
77456459b8ce077b35871ac7078c1e8ecf916ef1 | SQL | ronardj01/cfy-hotels-databases | /retrieve.sql | UTF-8 | 598 | 2.90625 | 3 | [] | no_license | select * from customers WHERE name = 'Laurence Lebihan';
select name, country from customers WHERE country = 'UK';
select address, city, postcode from customers WHERE name = 'Melinda Marsh';
select * from hotels WHERE postcode = 'DGQ127';
select * from hotels WHERE rooms > 11;
select * from hotels WHERE rooms > 6 ... | true |
40d9c2502b19b84b2dc45b27e4d88d02a39ca892 | SQL | fwidder/SmartGarden | /smartgarden-backend/src/main/resources/schema.sql | UTF-8 | 190 | 2.65625 | 3 | [] | no_license | create table SETTING
(
ID BIGINT not null
primary key,
NAME VARCHAR(255) not null
constraint UK_NAME
unique,
VALUE VARCHAR(255) not null
);
| true |
254c74ac152d03e8ca49da88d2d40499cc22570e | SQL | lindomar-alves/ASQ | /sistemacontroleatutorizacaoprocedimentosmedicos/src/main/resources/db/changelog/migrations/data-00.sql | UTF-8 | 1,178 | 3.234375 | 3 | [] | no_license | --liquibase formatted sql
--changeset lindomar:data-00
CREATE TABLE sexo (
id bigint GENERATED BY DEFAULT AS IDENTITY NOT NULL,
sexo varchar(2)
);
CREATE TABLE procedimento (
id bigint GENERATED BY DEFAULT AS IDENTITY NOT NULL,
procedimento int
);
CREATE TABLE idade (
id BIGINT GENERATED BY DEFA... | true |
912eb25b953e7cde6ed5509ca6a225813fcc66e0 | SQL | healerkx/code-snippet | /lang/python/PyToDo/td_entry.sql | UTF-8 | 531 | 3.125 | 3 | [] | no_license |
DROP TABLE IF EXISTS `td_entry`;
CREATE TABLE `td_entry` (
`entry_id` int(11) NOT NULL AUTO_INCREMENT,
`entry_content` varchar(1024) NOT NULL DEFAULT '' COMMENT '内容',
`entry_type` int(11) NOT NULL DEFAULT '0',
`entry_status` tinyint(4) NOT NULL DEFAULT '0',
`begin_time` datetime NOT NULL,
`end_time` dateti... | true |
9288b7a0b906da2ac094b2774f557e8ba6cd5930 | SQL | WebProjectLucasEmil/tasty-avocado | /database/initialize-database.sql | UTF-8 | 385 | 3.0625 | 3 | [] | no_license | -- Create a table to store user accounts in.
CREATE TABLE accounts (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
username VARCHAR(50) NOT NULL,
password VARCHAR(30) NOT NULL,
CONSTRAINT usernameUnique UNIQUE (username)
);
-- Create a dummy account for testing.
INSERT INTO accounts (name,... | true |
b055b6f33cb47bf2111e9971d76fb67cc082efee | SQL | CUBRID/cubrid-testcases | /sql/_03_object_oriented/_01_user_defined_type/_003_manipulation/cases/1010.sql | UTF-8 | 267 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | --test delete referenced class using drop statement
set system parameters 'create_table_reuseoid=no';
create class tb2(
col1 char(8)
);
create class tb1(
col1 int,
col2 tb2
);
drop class tb1;
drop class tb2;
set system parameters 'create_table_reuseoid=yes';
| true |
75d34d5b42c5d61cde64890714f71697b31058d0 | SQL | 4long7/koala | /blog.sql | UTF-8 | 3,077 | 3.125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
--
-- Host: localhost Database: xuan
-- ------------------------------------------------------
-- Server version 5.7.24-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R... | true |
b03243ee2b56de4f8ac516039cc86671bf6aa67b | SQL | ravshank/IntegratedBankingSystem | /SBA3_IntegratedBankingSystem/DB_scripts/DB_SCHEMA_24Oct_Updt.SQL | UTF-8 | 5,143 | 3.84375 | 4 | [] | no_license |
CREATE TABLE LOGIN
(USER_LOGIN_ID VARCHAR(20) NOT NULL,
USER_PASSWORD VARCHAR(20),
ACCOUNT_ID VARCHAR(16)
PRIMARY KEY(USER_LOGIN_ID ),
FOREIGN KEY(ACCOUNT_ID )
REFERENCES ACCOUNT (ACCOUNT_ID ));
CREATE TABLE ACCOUNT
(
ACCOUNT_ID VARCHAR(16) NOT NULL,
ACCOUNT_BALANCE DECIMAL(10,2),
ACCOUNT_TYPE_ID INT(10),
AC... | true |
cbdcc1be1be13637d96c7028b93b7188426331c8 | SQL | ststeiger/DAL | /DAL/SQL/ListSysadmins.sql | UTF-8 | 483 | 3.484375 | 3 | [] | no_license |
SELECT
login.name AS [Name]
,principal.type_desc
,principal.is_disabled
,principal.create_date
,principal.modify_date
,principal.default_database_name
FROM sys.server_principals AS principal
INNER JOIN sys.server_role_members AS membership
ON principal.principal_id = membership.role_principal_id
I... | true |
46fe3b370e0d2549af2e36f57eb3e52bfc875b73 | SQL | sasensio1/ProyectoCasosEmergenciasCompleto | /casosEmergenciasBulkApi/sql/UserTable.sql | UTF-8 | 789 | 3.359375 | 3 | [] | no_license | CREATE TABLE "user" (
"sfid" VARCHAR(18) NULL DEFAULT NULL,
"id" INTEGER NOT NULL DEFAULT NULL,
"createddate" TIMESTAMP NULL,
"systemmodstamp" TIMESTAMP NULL,
"_hc_err" TEXT NULL DEFAULT NULL,
"_hc_lastop" VARCHAR(32) NULL DEFAULT NULL,
"name" VARCHAR(121) NULL DEFAULT NULL,
PRIMARY KEY ("sfid")
)
;
... | true |
ecd7a304d6448b5907472288ccc8bffd354a836b | SQL | 766/LotteryBot | /application/crontab/sql/install.sql | UTF-8 | 2,603 | 3.484375 | 3 | [] | no_license | -- -----------------------------
-- 导出时间 `2019-05-25 21:31:13`
-- -----------------------------
-- -----------------------------
-- 表结构 `dp_crontab`
-- -----------------------------
DROP TABLE IF EXISTS `dp_crontab`;
CREATE TABLE `dp_crontab` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`type` var... | true |
35e5d6614b561b962d423dcecf7eb1c397392506 | SQL | alexqiao/Rank8-Solution-for-2018-ATEC-Anti-Fraud-Competition | /cbc/feature_engineering/dist_cnt_feature/client_ip_dist_cnt_feature.sql | UTF-8 | 11,931 | 3.5 | 4 | [] | no_license | -- 求 client_ip 在各字段下不同值的个数特征(历史时间)
-- user_id
DROP TABLE IF EXISTS client_ip_user_id_dist_cnt
;
CREATE TABLE client_ip_user_id_dist_cnt AS
SELECT event_id
,SUM(CAST ( tmp_cnt = 1 AS INT )) OVER ( PARTITION BY client_ip ORDER BY ocu_date ASC ) AS client_ip_user_id_dist_cnt
FROM (SELECT event_id
... | true |
1b949db99ff1dbd10cc4858b8a2045ea3239c43d | SQL | Sefonk/Prueba-Angular | /producto.sql | UTF-8 | 1,477 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 21-08-2021 a las 18:07:50
-- Versión del servidor: 8.0.26
-- Versión de PHP: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... | true |
605377cb74ed0d47025b2c05f8c6634becbbd350 | SQL | ylumbangaol/Progate | /SQL/SQL 3/page6/exercise1.sql | UTF-8 | 136 | 2.875 | 3 | [] | no_license | SELECT *
FROM players
-- Add a name to the combined table
JOIN countries
-- Add a join condition
ON players.country_id = countries.id
; | true |
9914c8a9141a4edb1ebd63e85c2b53c59abe33ac | SQL | mtejas88/esh | /Projects_SotS_2017/wifi/archived/exploring/src/connectivity_all_years.SQL | UTF-8 | 1,210 | 3.109375 | 3 | [] | no_license | select esh_id::varchar,
postal_cd,
num_students::varchar,
ia_bandwidth_per_student::varchar as bw_per_student,
case
when ia_cost_per_mbps != 'Insufficient data'
and ia_cost_per_mbps != 'Infinity'
then ia_cost_per_mbps::numeric
end as ia_cost_per_mbps,
district_size,
locale,
2015 as year
from public.fy2015_dis... | true |
872a41b97956355792e164d33fe22cd9fe2d1e44 | SQL | aire-atlas/gitted.aire-atlas.europe-riate | /postgresql/table.anam_eu27_nuts2006_gdpppp2007.schema.sql | UTF-8 | 1,964 | 2.765625 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: anam_e... | true |
7e0e6aa4babbf35df365b2db5cac96751ba8d05e | SQL | CharlotteLina/Cohortes | /SQL/matieres.sql | UTF-8 | 4,789 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : lun. 27 mai 2019 à 19:18
-- Version du serveur : 5.7.23
-- Version de PHP : 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
f5d2ca1636622bd783645aadfc4689d1a867b510 | SQL | sbaik97/Pewlett-Hackard-Analysis | /Joining_count_orderby.sql | UTF-8 | 3,046 | 4.3125 | 4 | [] | no_license | -- Joining departments and dept_manager tables
SELECT departments.dept_name,
dept_manager.emp_no,
dept_manager.from_date,
dept_manager.to_date
FROM departments
INNER JOIN dept_manager
ON departments.dept_no = dept_manager.dept_no;
-- Joining retirement_info and dept_emp tables
SELECT retiremen... | true |
893eac4d694448305bff3ce91f0a062afcd79807 | SQL | syrfhdytllh/Kuis_1106 | /kuis1106.sql | UTF-8 | 2,623 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: 12 Des 2017 pada 15.28
-- Versi Server: 5.7.15-log
-- PHP Version: 5.6.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
f0e0bf950be7c4dede1ce6045992d2d16c7149fb | SQL | datarttu/hfpBlog | /explore/raw_hfpv2_queries.sql | UTF-8 | 976 | 3.234375 | 3 | [] | no_license | -- Using raw HFP v2 storage db
SELECT event_type, (stop is null) AS stop_null, count(tst)
FROM bus
WHERE event_type::text IN ('ARR', 'DEP', 'ARS', 'PDE', 'PAS', 'WAIT', 'DOO', 'DOC')
GROUP BY 1, 2
ORDER BY 1, 2;
SELECT event_type, (stop is null) AS stop_null, count(tst)
FROM tram
WHERE event_type::text IN ('ARR', 'DEP... | true |
633867f49edb92dd68a2dc9b4f22d3ba5fedabd1 | SQL | CS157A-Team-8/CS157A-Summer-Project | /Tables/157a_user_has_friendlist.sql | UTF-8 | 2,207 | 2.75 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: 157a
-- ------------------------------------------------------
-- Server version 8.0.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... | true |
f27a3176748e4b305e32e42e2ee789e3f0b6dc75 | SQL | yosinhasan/profilephp | /user.sql | UTF-8 | 3,679 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 03, 2015 at 09:12 PM
-- Server version: 5.6.25-0ubuntu0.15.04.1
-- PHP Version: 5.6.4-4ubuntu6.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
d5cce0c724e214a5104cf5367a5cba5879fd7b61 | SQL | AnthonyDisasi/Projet_Hopital | /BBD-Hopital/SQL/Oracle/SQL-Création.sql | UTF-8 | 6,949 | 3.1875 | 3 | [] | no_license | ALTER TABLE PATIENT
DROP CONSTRAINT fkPatientService;
ALTER TABLE PATIENT
DROP CONSTRAINT fkPatientLit;
ALTER TABLE EMPLOYE
DROP CONSTRAINT fkEmployeRole;
ALTER TABLE GERER
DROP CONSTRAINT fkGererTraitement;
ALTER TABLE GERER
DROP CONSTRAINT fkGererEmploye;
ALTER TABLE TRAITEMENT
DROP CONSTRAINT fkTraitementPatient;
AL... | true |
0d330672ce8eae8a4d1a1bd21ecd54069ab936f6 | SQL | manishsijaria/amiseq-sms-html | /express-backend/database/PopulateDBScript.sql | UTF-8 | 4,137 | 4.125 | 4 | [] | no_license |
/*================== Populate DB Script ==================*/
insert into user_type (user_type_id, type_name)
values (1, 'Super Admin'), (2, 'Admin'), (3, 'Recruiter'), (4, 'Sales');
insert into contact_type (contact_type_id, type_name)
values (1, 'Candidate'), (2, 'Client'), (3, 'Others');
/*================== Use... | true |
9dd6dc136c0b29b42cc36f6ac3c27fb82001a3d9 | SQL | LogIN-/fluprint | /documentation/fluprint_schema.sql | UTF-8 | 5,677 | 3.203125 | 3 | [
"AGPL-3.0-only"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 22, 2019 at 04:01 PM
-- Server version: 10.3.14-MariaDB-log
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... | true |
3d06f8c8d600a11ec4e3e31487f9215837c59455 | SQL | nightomicron/RabIT_Gadget | /rabit.sql | UTF-8 | 2,782 | 3.46875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Gép: 127.0.0.1
-- Létrehozás ideje: 2020. Nov 12. 16:05
-- Kiszolgáló verziója: 10.4.14-MariaDB
-- PHP verzió: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
a27e63745b8e584babbc5ec4ea7919c1caa74a2b | SQL | houruijie/service2 | /dump.sql | UTF-8 | 2,313 | 3.015625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64)
--
-- Host: localhost Database: location
-- ------------------------------------------------------
-- Server version 5.7.25-0ubuntu0.18.04.2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_S... | true |
1ab613a0c12a5db19137b84e565ead715ef63fd7 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/Scripts Complementarios/TCS_11/40_DEL_DUP_FIN_GENERAL_V01.sql | UTF-8 | 319 | 2.734375 | 3 | [] | no_license | /*
TCS_11;IAXIS-2119 - JLTS - 10/03/2019 Se eliminan los datos duplicados de la tabla FIN_GENERAL, para que quede solo un dato por SPERSON
*/
-- Se selecionan el registro com mayor SFINANCI
DELETE
FROM fin_general f1
WHERE ROWID IN (SELECT MAX(ROWID) FROM fin_general f2 GROUP BY f2.sperson HAVING COUNT(*) > 1)
/
| true |
730a082dd605cdd4ae33154a43dc74ac873bcdd1 | SQL | youjianjin/edaizao | /db/table_create.sql | UTF-8 | 1,378 | 2.546875 | 3 | [] | no_license | CREATE TABLE `t_user` (
`oid` varchar(32) NOT NULL,
`gusername` varchar(32),
`gmobile` varchar(11) NOT NULL,
`gemail` varchar(32) NOT NULL,
`gpassword` varchar(50) NOT NULL,
`glev1` varchar(2) DEFAULT '00',
`glev2` varchar(2) DEFAULT '00',
`glev3` varchar(2) DEFAULT '00',
`ts` varchar(20) DEFAULT NULL,
... | true |
bb2e4667225eeb47eb058d964ac1abea61ad3769 | SQL | Alphamj/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/7-cities.sql | UTF-8 | 310 | 3.203125 | 3 | [] | no_license | -- Create a new table
-- Crate a database
CREATE DATABASE
IF NOT EXISTS hbtn_0d_usa;
CREATE TABLE
IF NOT EXISTS hbtn_0d_usa.cities
(
id INT UNIQUE NOT NULL AUTO_INCREMENT PRIMARY KEY,
state_id INT NOT NULL,
name VARCHAR(256) NOT NULL,
FOREIGN KEY(state_id) REFERENCES hbtn_0d_usa.states(id)
);
| true |
b8d1d9eb72ff526c355df4d6c8c4f74156c67361 | SQL | cckmit/erp-4 | /Maven_Accounting/src/main/resources/sqlscript/custom_data_insertproc.sql | UTF-8 | 11,865 | 3.34375 | 3 | [] | no_license | DROP PROCEDURE if exists insert_custom_data;
delimiter //
CREATE PROCEDURE insert_custom_data (IN accidparam varchar(255), IN companyidparam varchar(60), IN usersessionidparam varchar(60), IN moduleidparam smallint(6), IN startdate varchar(20), IN enddate varchar (20), IN delimiter varchar(10), IN iscustomfield int(1))... | true |
299b67fac3fd064c2b935bd3ea61b3b13ba0855d | SQL | anujpal82/Training-Feb-2021 | /Modules/SQL/Day11/tarun moradiya/assignment/additionalTask.sql | UTF-8 | 1,779 | 4.40625 | 4 | [] | no_license |
/*Create a listing of all Faculty Members (First and Last), their Faculty Position and the University that they are affiliated with (Name),
along with their Monthly_Dues (Calculated Field with a column alias). Sort the records in descending order by University and then by Faculty's
last name in ascending order. */
S... | true |
68c85ee08ecec653002c57461404b6128ecfe1cb | SQL | ljbustamante/dsw2-cl2-servidor | /WebContent/WEB-INF/bd/bd_cl2.sql | UTF-8 | 753 | 3.484375 | 3 | [] | no_license | use dsw2_cl2;
CREATE TABLE `tb_producto` (
`idProducto` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(30) DEFAULT NULL,
`marca` varchar(30) DEFAULT NULL,
`precio` double DEFAULT NULL,
`stock` int(11) DEFAULT NULL,
PRIMARY KEY (`idProducto`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DELIMITER ;;
CREATE ... | true |
60cfbf0d5e51183ea0540231cd6d893ef3e319dc | SQL | ih-hira/PL-SQLProject | /Func and Procedure/discount/proc_discount.sql | UTF-8 | 416 | 2.84375 | 3 | [] | no_license | create or replace procedure discount
is
tid integer := max_appointment();
cost integer;
r integer;
cursor dis_cur is
select amount from payment
where pid = tid;
Begin
open dis_cur;
loop
fetch dis_cur into r;
exit when dis_cur%notfound;
cost := r - 100 ;
update Payment set a... | true |
b46fd0a94458007930f6c05288dcd06b552ec1f4 | SQL | jamil-said/code-samples | /PHP/CRUD_API_Laravel6/database.sql | UTF-8 | 1,089 | 3.65625 | 4 | [] | no_license | -- Database creation for Laravel 6 CRUD API:
-- Creation of Database and suitable DB user (Important: create user with mysql_native_password on MySQL 8.0+)
-- mysql -u root -p (run this in shell first)
CREATE DATABASE LaravelCrudApi;
CREATE USER 'crudapiuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'RRdsf... | true |
0bb4bec861f7c681a328d6668d726097dc97fabb | SQL | okbeng2/bookManage | /sqlFile/borrowbook.sql | UTF-8 | 1,384 | 3.1875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50553
Source Host : localhost:3306
Source Schema : bookmanage
Target Server Type : MySQL
Target Server Version : 50553
File Encoding : 65001
Date: 31/12... | true |
3521bf587839a29b5b5c8775994e32db555a164d | SQL | dave-mccloskey/scrapandrun | /src/clothes/sql/top_in_categories.sql | UTF-8 | 184 | 3.578125 | 4 | [] | no_license | SELECT R.*, S.name FROM (
SELECT * FROM clothes_article ORDER BY cost DESC
) R, clothes_articletype S
WHERE R.article_type_id = S.id
GROUP BY article_type_id
ORDER BY cost DESC; | true |
3c61faa68073a66f0f13f1a448d2cb8bc73ed836 | SQL | kalibek/tournament | /src/main/resources/db/migration/V001__init.sql | UTF-8 | 2,977 | 3.765625 | 4 | [] | no_license | create table players
(
id bigserial primary key,
name varchar not null,
rating int not null default 1200,
created timestamp not null default current_timestamp,
updated timestamp not null default current_timestamp
);
create table series
(
id bigserial primary key,
name ... | true |
e39a07177e17aca4683f376bf8f870deff12cf79 | SQL | vmejiaec/setimimpq | /KCG/xDB/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/Procs1/Com_Contrato_Legal_Upd.proc.sql | UTF-8 | 1,902 | 3.609375 | 4 | [] | no_license | CREATE PROCEDURE dbo.Com_Contrato_Legal_Upd
(
@Com_Contrato_Id int,
@Com_Contrato_Tipo_Id int,
@URL_Contrato_Word varchar(250),
@URL_Contrato_Scan varchar(250),
@Desc_Alerta_1 varchar(500),
@Desc_Alerta_2 varchar(500),
@Desc_Alerta_3 varchar(500),
@Fecha_Firma_Contrato smalldatetime,
@Fecha_Contrato... | true |
2c115f747e5fabcbbcff45a3bd4d4096a694e79a | SQL | akirap3/Resume_Sample | /FanPeter_Dev/mysql_init/init.sql | UTF-8 | 978 | 3.015625 | 3 | [] | no_license | create database chatbot_db;
use chatbot_db;
create table users (
user_open_id varchar(255),
user_nick_name varchar(255),
user_status varchar(255),
user_img varchar(255),
user_register_date varchar(255),
user_register_menu varchar(255),
PRIMARY KEY (user_open_id)
)ENGINE=InnoDB DEFAULT CHAR... | true |
8224be8a8503588a783d057dacdd21bdff971f70 | SQL | optigraphic/gs_kadai08 | /10_46_MukaidonoMasataka/gs_route_ikiru.sql | UTF-8 | 5,280 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2018 年 11 月 01 日 23:36
-- サーバのバージョン: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... | true |
6e6c91b51ffa67410ee344a2b5c09802be36a22a | SQL | jhoncbuendia/icontec | /asistencia.sql | UTF-8 | 654 | 3.84375 | 4 | [
"MIT"
] | permissive |
delimiter $$
DROP PROCEDURE IF EXISTS asistencia$$
create procedure asistencia(usuario int)
begin
select u.id_user, u.id_servicio, count(a.id) asistencia, ms.id, count(s.id) as clases, (count(a.id)*100/count(s.id)) as porcentaje
from tbl_usuarios_matriculados as u
join tbl_modulosxserv... | true |
9a53ca37fe9d9759045e2392ec293269e55e7204 | SQL | ExePtion31/DB | /Parcial.sql | UTF-8 | 4,050 | 3.375 | 3 | [] | no_license | create database Parcial;
use Parcial;
/*-----------TABLAS--------*/
create table Cliente(
ID_Cli int auto_increment,
Nombre_Cli varchar(20) not null,
Apellido_Cli varchar(20) not null,
Direccion_Cli varchar(20) not null,
Email_Cli varchar(20) not null,
Password_Cli varchar(20) not null,
Imagen_Cli varchar(20) not null... | true |
9f5f8bda5f53f988cc5dfe431553c847536ce3d9 | SQL | mcphersonr/info2180-project3 | /schema.sql | UTF-8 | 3,456 | 2.90625 | 3 | [] | no_license | -- Users
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id int unsigned auto_increment,
firstname varchar(255) not null,
lastname varchar(255) not null,
username varchar(255) not null,
password varchar(255) not null,
primary key(id)
);
INSERT INTO users (username, firstname, lastname, passwor... | true |
2e839cc1b7561b231e43f3fb332365ad51b89dbe | SQL | udkumar/Latest | /api/configs/db_seeds.sql | UTF-8 | 1,371 | 3.421875 | 3 | [] | no_license | DROP DATABASE IF EXISTS MAIIC_DB1;
CREATE DATABASE MAIIC_DB1;
CREATE TABLE roles (
role_id BIGSERIAL PRIMARY KEY,
role_name TEXT UNIQUE NOT NULL
);
INSERT INTO roles (role_name) VALUES ('student'),('faculty'),('admin');
CREATE TABLE users (
u_id BIGSERIAL PRIMARY KEY,
public_id TEXT UNIQUE NOT NULL,
user_id TE... | true |
def900f7ee5cde25e51b2cf310fc7b1118fe8639 | SQL | janjagusch/halite-battlestation | /halite_battlestation/bigquery/datasets/benchmark/views/_units_latest.sql | UTF-8 | 213 | 2.90625 | 3 | [
"MIT"
] | permissive | SELECT * except(row_number)
FROM (
SELECT
*,
row_number() OVER (PARTITION BY match_id, step, unit_id ORDER BY inserted_at DESC) AS row_number
FROM `kaggle-halite.benchmark.units`
)
WHERE row_number=1;
| true |
4cfb7fcac063fee5159172f3b21c03df0e4d9502 | SQL | DimolSPA/Dimol-Fix-Carteras | /Dimol.Carteras/Dimol.Carteras.Database/dbo/Stored Procedures/Procs3/Update_Productos_Impuestos.sql | UTF-8 | 383 | 2.59375 | 3 | [] | no_license |
Create Procedure Update_Productos_Impuestos(@pdi_codemp integer, @pdi_prodid numeric (15), @pdi_iptid smallint) as
UPDATE productos_impuestos
SET pdi_codemp = @pdi_codemp,
pdi_prodid = @pdi_prodid,
pdi_iptid = @pdi_iptid
WHERE ( productos_impuestos.pdi_codemp = @pdi_codemp ) AND... | true |
2acea828d21050fb53dfabec29301b082bf7a3f8 | SQL | Sa6oZnaka/Green-Empire | /db.sql | UTF-8 | 774 | 3.546875 | 4 | [] | no_license | Drop database if exists GreenE;
create database GreenE CHARSET 'utf8';
use GreenE;
Create table Users(
id INT primary key auto_increment,
username varchar(50) NOT NULL,
score LONG NOT NULL,
password varchar(100) NOT NULL
);
CREATE TABLE Garden (
id int NOT NULL PRIMARY KEY auto_increment,
userId INT... | true |
e3ec098f65eba0f3109e54849be0b93be941a9ad | SQL | 1353296471/BUYSHOP | /sql文件及演示ppt/buyshop.sql | UTF-8 | 17,316 | 2.859375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 80015
Source Host : localhost:3306
Source Database : buyshop
Target Server Type : MYSQL
Target Server Version : 80015
File Encoding : 65001
Date: 2019-12-01 19:52:01
*/
SET FOREIGN_KEY_... | true |
3fef77ae22a4720fbd28ab477884afcb25af2b5e | SQL | v-a-kernel/sql-ex | /exercises_from_sql-ex.ru/sql-ex-020.sql | UTF-8 | 342 | 3.265625 | 3 | [] | no_license | -- Найдите производителей, выпускающих по меньшей мере три различных модели ПК.
-- Вывести: Maker, число моделей ПК.
SELECT maker, COUNT(model)
FROM product
WHERE type = 'pc'
GROUP BY product.maker
HAVING COUNT (DISTINCT model) >= 3
| true |
317f1b0bb60c47adda825437f94effd7c9246ec7 | SQL | zulfikarpro/femaleDailyTest | /init.sql | UTF-8 | 738 | 2.5625 | 3 | [] | no_license | CREATE EXTENSION tablefunc;
create table sales_db(id serial, firstname varchar, lastname varchar, email varchar, item varchar, quantity numeric, total_price numeric);
INSERT INTO public.sales_db (firstname,lastname,email,item,quantity,total_price) VALUES
('Yoh','Asakura','yoh@mail.com','sepatu',3,60000),
('Tao','Re... | true |
044c2310e3e35f3fc7f8e8221ae477dc71f762a3 | SQL | rarasfranita/IF3111-1920 | /lapordb.sql | UTF-8 | 24,797 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 13, 2019 at 09:59 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
6e57a13bdd147b07341e593ff95d67f920357e4d | SQL | vgoel38/PQET | /inputs/really_final_outputs/original/without_nlj/12c.sql | UTF-8 | 7,475 | 2.640625 | 3 | [] | no_license | QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------... | true |
f2444f213b9eb05f00d457def00f6071efadd742 | SQL | daehyeonhong/SpringProject | /springsecurity.sql | UTF-8 | 905 | 3.609375 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE USERS(
USERNAME VARCHAR2(50) NOT NULL PRIMARY KEY,
PASSWORD VARCHAR2(50) NOT NULL,
ENABLED CHAR(1) DEFAULT '1'
);
CREATE TABLE AUTHORITIES(
USERNAME VARCHAR2(50) NOT NULL,
AUTHORITY VARCHAR2(50) NOT NULL,
CONSTRAINT FK_AUTHORITIES_USERS FOREIGN KEY(USERNAME)REFERENCES USERS(USERNAME)
);
CREATE ... | true |
0b0a995e71b5ceb1b9e353b8bae1355b5b3fd5b1 | SQL | gomezTaboada/flask_app | /mysql_data/raw/db_flask_product.sql | UTF-8 | 2,615 | 2.6875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64)
--
-- Host: database-1.c2fymdnpg9vc.us-east-1.rds.amazonaws.com Database: db_flask
-- ------------------------------------------------------
-- Server version 8.0.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHA... | true |
106122dbb9aa8f3e0f4b5ef50bdcd0b54d541a8b | SQL | facebookincubator/CG-SQL | /sources/lua_demo/t4.sql | UTF-8 | 977 | 3.484375 | 3 | [
"MIT"
] | permissive | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
@attribute(cql:shared_fragment)
create proc foo(x integer)
begin
if x is 7 then
select 9 x, 8 y;
else if x is not null... | true |
fbe373b0eb66975f07e1d4343d90f10a42671838 | SQL | wellinmart32/Databases | /Oracle DB/apex/apxpatch.sql | UTF-8 | 925 | 2.65625 | 3 | [] | no_license | Rem Copyright (c) Oracle Corporation 1999 - 2018. All Rights Reserved.
Rem
Rem NAME
Rem apxpatch.sql
Rem
Rem DESCRIPTION
Rem This script installs an Oracle Application Express patchset.
Rem
Rem NOTES
Rem Assumes the SYS user is connected.
Rem
Rem REQUIREMENTS
Rem
Rem MODIFIED (MM/DD/YYY... | true |
c68456dd840ce5eee5766f265f1246cd52c898f7 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/indices/DETCESAUX_NUK.sql | UTF-8 | 532 | 2.609375 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Index DETCESAUX_NUK
--------------------------------------------------------
CREATE INDEX "AXIS"."DETCESAUX_NUK" ON "AXIS"."DETCESAUX" ("SCONTRA", "NVERSIO", "CTRAMO", "CCOMPANI")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING
... | true |
f458452336eccce8a1d6c0444a02310b0de92a9c | SQL | sergey-kochetov/SQLSMD_EE2 | /src/main/resources/sql/v1.sql | UTF-8 | 567 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive |
CREATE DATABASE sqlcmd_log
WITH OWNER = postgres
ENCODING = 'UTF8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
CREATE SEQUENCE user_action_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 679
CACHE 1;
ALTER TABLE user_action_seq
OWNER TO postgres;
CREATE TABLE user_... | true |
b5399869f9ca689864b95532f6eff1eff60d071c | SQL | IamLam163/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/10-genre_id_by_show.sql | UTF-8 | 221 | 3.734375 | 4 | [] | no_license | -- lists all shows
-- have at least one genre
SELECT tv_shows.title, tv_show_genres.genre_id FROM tv_show_genres
INNER JOIN tv_shows
ON tv_shows.id=tv_show_genres.show_id
ORDER BY tv_shows.title, tv_show_genres.genre_id;
| true |
32c6d3e22427146d1a310e4d39672946601086f2 | SQL | upobir/ForceCodes | /sql/DDL/view.sql | UTF-8 | 3,962 | 4.0625 | 4 | [] | no_license | CREATE OR REPLACE VIEW
USER_CONTESTANT_VIEW
AS
SELECT
C.ID,
C.HANDLE,
C.CREATION_TIME,
U.FIRST_NAME,
U.LAST_NAME,
U.PASSWORD,
U.EMAIL,
U.RATING,
U.RANK_ID,
U.LOGIN_TIME,
U.PICTURE,
U.DATE_OF_BIRTH,
U.ORG_ID,
... | true |
06d20ffc82158736ff76f626d03c5da1f4209f82 | SQL | mrh-code-star/Test | /etc/userinfo_struct.sql | UTF-8 | 1,601 | 3.46875 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
DROP DATABASE IF EXISTS `userinfo`;
CREATE DATABASE `userinfo`
CHARACTER SET 'utf8'
COLLATE 'utf8_general_ci';
USE `userinfo`;
#
# Structure for the `account_main` table :
#
CREATE TABLE `account_main` (
`accountid` bigint(20) unsigned NOT NULL auto_increment COMMENT '记录流水号',
... | true |
35194ae2e1918495ef1fed5ec056582c14df5059 | SQL | NoobsDevelopers/L2Nextgen | /sql/database_user/ally_data.sql | UTF-8 | 350 | 2.765625 | 3 | [] | no_license | DROP TABLE IF EXISTS `ally_data`;
CREATE TABLE ally_data (
ally_id INT NOT NULL default 0,
ally_name VARCHAR(45) character set utf8,
leader_id INT UNSIGNED NOT NULL DEFAULT 0,
expelled_member INT UNSIGNED NOT NULL DEFAULT 0,
crest VARBINARY(192) NULL DEFAULT NULL,
PRIMARY KEY (ally_id),
KEY `leader_id` (... | true |
dd0007a32c564f61612fe093a6c8446c90c9695c | SQL | Victor-Sun/CIS | /CIS501/hw11.sql | UTF-8 | 1,126 | 4.0625 | 4 | [] | no_license | --
-- Name: Victor Sun
-- Homework 11
--
SPOOL hw11.out
SET ECHO ON
--
-- Write a query to select the all of the album names in your collection.
--
SELECT title
FROM albums;
--
-- Write a query to select the all the track titles with a rating greater than or equal to 4.
--
SELECT title
FROM tracks
WHERE rating >= 4;
--... | true |
1c4c00f528d894b3beea968e6b14a1882a154135 | SQL | rickyganteng/test-react-BE | /barang.sql | UTF-8 | 2,542 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 11 Sep 2021 pada 15.09
-- Versi Server: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... | true |
80f2d4486b36cb7dc86a7ec324db4d8876ced86d | SQL | KaremReyesA/ProyectoSistemaMonarca-Huella | /src/db/SistemaMonarca.sql | UTF-8 | 6,520 | 3.40625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 20-10-2017 a las 18:47:32
-- Versión del servidor: 10.1.25-MariaDB
-- Versión de PHP: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone ... | true |
5d3591cc0825a2443156a32d376cad061ad80527 | SQL | kjknisely/SAKAutoAuctions | /Auctioneer.sql | UTF-8 | 758 | 2.609375 | 3 | [] | no_license | create table Auctioneer (
assn int,
salesrate int,
foreign key (assn) references Employee (ssn)
);
insert into Auctioneer (assn, salesrate) values (737635511, 42);
insert into Auctioneer (assn, salesrate) values (407895301, 35);
insert into Auctioneer (assn, salesrate) values (628761508, 45);
insert into Auctionee... | true |
7438c5d96bb629e48a7bc42af63f60e4374f4705 | SQL | XClouded/avp | /.svn/pristine/74/7438c5d96bb629e48a7bc42af63f60e4374f4705.svn-base | UTF-8 | 180 | 2.71875 | 3 | [] | no_license | SELECT
ID,
TransactionID,
Message,
Source,
Code
FROM
/*=SCHEMA*/TRANSACTIONMESSAGES
WHERE
TRANSACTIONID = ?
AND SOURCE = ?
AND CODE = ?
ORDER BY
WRITTEN DESC | true |
5e4790aefb18d0b22cd975b71d5d14924f8a698d | SQL | kseniyaKrasnikova/SQLlearning | /dump/twitter.sql | UTF-8 | 13,023 | 2.578125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb1+deb.cihar.com~xenial.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 26, 2018 at 11:57 PM
-- Server version: 5.7.23-0ubuntu0.16.04.1
-- PHP Version: 7.0.31-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "... | true |
4b4787656cdf0555558e547777417c5a137badf1 | SQL | SamuelReyesAlvarez/ProyectoHibernateJFX | /HibernateJFX/scripts/ScriptBaseDatosProyectoHibernate.sql | UTF-8 | 5,887 | 3.40625 | 3 | [] | no_license | DROP DATABASE valorator;
CREATE DATABASE IF NOT EXISTS valorator;
USE valorator;
CREATE TABLE IF NOT EXISTS empresa(
idEmpresa INTEGER AUTO_INCREMENT NOT NULL,
nombre VARCHAR (25) NOT NULL UNIQUE,
CONSTRAINT pkIdEmpresa PRIMARY KEY (idEmpresa)
);
CREATE TABLE IF NOT EXISTS juego(
idJuego INTEGER AUTO_INCREMENT N... | true |
0852c154098fa06e8a06ec3ac0eba9013d381882 | SQL | KhanSei/open-source-rpg | /src/prisma/migrations/20211111223711_init/migration.sql | UTF-8 | 2,871 | 3.71875 | 4 | [
"MIT"
] | permissive | -- CreateTable
CREATE TABLE `character` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`name` VARCHAR(191) NOT NULL,
`age` INTEGER NULL,
`gender` VARCHAR(191) NULL,
`player_name` VARCHAR(191) NULL,
`current_hit_points` INTEGER NOT NULL DEFAULT 0,
`max_hit_points` INTEGER NOT NULL DEFAULT 0,
`cu... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.